Long time no see :slightly_smiling_face: is this c...
# kotlinx-files
r
Long time no see 🙂 is this channel still active? I got one question, is it possible to check available space on Path with Okio or kotlinx-io? My use case is that I want to download large file and I know the size of it beforehand and I want to know if the user has available space left. It is a zip file so I will need about double the space and I want to inform user he has not got available space before even downloading.
f
Hey! Neither Okio, not kotlinx-io lets you query available space on a partition/volume corresponding to a particular path. As a workaround, you can use platform-specific APIs for that. For example, on JVM it would be Files.getFileStore + FileStore.getUsableSpace (didn't check it though, so it's better to double check)
👍 1