Interface Paths
public interface Paths
Static methods that return a Path by converting a path string or URI.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSmile home directory.static final List<FileSystem> Readonly file systems for resources. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic StringgetFileExtension(Path path) Returns the file extension in lower case.static StringgetFileName(Path path) Returns the file name without extension.static PathgetTestData(String... path) Get the file path of a test sample dataset.getTestDataLines(String... path) Returns the reader of a test data.static BufferedReadergetTestDataReader(String... path) Returns the reader of a test data.static booleanHeuristically checks if a file is likely a binary file.Returns the file path of a resource.Returns the file path of a resource.
-
Field Details
-
home
Smile home directory. -
resourceFileSystems
Readonly file systems for resources.
-
-
Method Details
-
resource
-
resource
-
getFileName
-
getFileExtension
-
isBinary
Heuristically checks if a file is likely a binary file. The method considers a file binary if it contains any null bytes within the first 1024 bytes.- Parameters:
path- The file to check.- Returns:
- true if the file is likely binary, false otherwise.
-
getTestData
-
getTestDataReader
Returns the reader of a test data.- Parameters:
path- the path strings to be joined to form the path.- Returns:
- the reader of the test data.
- Throws:
IOException- when fails to create the reader.
-
getTestDataLines
Returns the reader of a test data.- Parameters:
path- the path strings to be joined to form the path.- Returns:
- the file lines of test data.
- Throws:
IOException- when fails to read the file.
-