Class FileSystemNatives

java.lang.Object
org.elasticsearch.common.filesystem.FileSystemNatives

public final class FileSystemNatives extends Object
This class provides utility methods for calling some native methods related to filesystems.
  • Method Details

    • init

      public static void init()
    • allocatedSizeInBytes

      public static OptionalLong allocatedSizeInBytes(Path path)
      Returns the number of allocated bytes on disk for a given file.
      Parameters:
      path - the path to the file
      Returns:
      an OptionalLong that contains the number of allocated bytes on disk for the file. The optional is empty is the allocated size of the file failed be retrieved using native methods