java.lang.Object
org.elasticsearch.common.io.FileSystemUtils
Elasticsearch utils to work with 
Path- 
Method SummaryModifier and TypeMethodDescriptionstatic PathAppends the path to the given base and strips N elements off the path if strip is > 0.static voiddeleteSubDirectories(Path... paths) Deletes all subdirectories in the given path recursivelystatic booleanReturnstrueiff one of the files exists otherwisefalsestatic Path[]Returns an array of all files in the given directory.static Path[]Returns an array of all files in the given directory matching the glob.static Path[]files(Path from, DirectoryStream.Filter<Path> filter) Returns an array of all files in the given directory matching.static booleanisAccessibleDirectory(Path directory, org.apache.logging.log4j.Logger logger) Check that a directory exists, is a directory and is readable by the current userstatic booleanisDesktopServicesStore(Path path) Check whether the file denoted by the given path is a desktop services store created by Finder on macOS.static booleanCheck whether the file denoted by the given path is hidden.static InputStreamopenFileURLStream(URL url) Returns an InputStream the given url if the url has a protocol of 'file' or 'jar', no host, and no port.
- 
Method Details- 
existsReturnstrueiff one of the files exists otherwisefalse
- 
isHiddenCheck whether the file denoted by the given path is hidden. In practice, this will check if the file name starts with a dot. This should be preferred toFiles.isHidden(Path)as this does not depend on the operating system.
- 
isDesktopServicesStoreCheck whether the file denoted by the given path is a desktop services store created by Finder on macOS.- Parameters:
- path- the path
- Returns:
- true if the current system is macOS and the specified file appears to be a desktop services store file
 
- 
appendAppends the path to the given base and strips N elements off the path if strip is > 0.
- 
deleteSubDirectoriesDeletes all subdirectories in the given path recursively- Throws:
- IllegalArgumentException- if the given path is not a directory
- IOException
 
- 
isAccessibleDirectoryCheck that a directory exists, is a directory and is readable by the current user
- 
openFileURLStreamReturns an InputStream the given url if the url has a protocol of 'file' or 'jar', no host, and no port.- Throws:
- IOException
 
- 
filesReturns an array of all files in the given directory matching.- Throws:
- IOException
 
- 
filesReturns an array of all files in the given directory.- Throws:
- IOException
 
- 
filesReturns an array of all files in the given directory matching the glob.- Throws:
- IOException
 
 
-