Object
XPaths
Additions to standard java.nio.file.Paths
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Path
appendToFileName
(Path path, String postfix) Append postfix into file name.static Path
appendToFullFileName
(Path path, String postfix) Append postfix into full file name.static String[]
splitFileName
(String fileName) Usually extension of the file is part of its file name.
-
Constructor Details
-
XPaths
public XPaths()
-
-
Method Details
-
splitFileName
Usually extension of the file is part of its file name. This function splits file name on two-value array:array[0] = file name (without extension) array[1] = file extension (or null if extension is absent)
If filename starts with '.' it means it has no extension.
-
appendToFileName
Append postfix into file name.Postfix is appended to the file name excluding its extension:
Will produce: "/tmp/a-cropped.png"appendToFileName(Paths.get("/tmp/a.png"), "-cropped")
-
appendToFullFileName
Append postfix into full file name.Postfix is appended to the file name including its extension:
Will produce: "/tmp/a.png-cropped"appendToFullFileName(Paths.get("/tmp/a.png"), "-cropped")
-