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 OptionalLong
allocatedSizeInBytes
(Path path) Returns the number of allocated bytes on disk for a given file.static void
init()
-
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
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
-