Java nio provides us the option to create sparse files
val path = Path("""E:a""")
val fileChannel = FileChannel.open(
path,
StandardOpenOption.READ,
StandardOpenOption.WRITE,
StandardOpenOption.CREATE_NEW,
StandardOpenOption.SPARSE,
)
The documentation says sparse file will be created if the OS and filesystem support it, but if it doesn’t it will create a regular file
But I want to know if the OS+filesystem does or does not support SPARSE so that, I can disable a feature from my app.