java.lang.Object
org.elasticsearch.common.filesystem.FileSystemNatives
This class provides utility methods for calling some native methods related to filesystems.
-
Method Summary
Modifier and TypeMethodDescriptionstatic OptionalLongallocatedSizeInBytes(Path path) Returns the number of allocated bytes on disk for a given file.static voidinit()
-
Method Details
-
init
public static void init() -
allocatedSizeInBytes
Returns the number of allocated bytes on disk for a given file.- Parameters:
path- the path to the file- Returns:
- an
OptionalLongthat 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
-