PathUtils
Leave feedback
On this page
Inheritance: java.lang.Object
public class PathUtils
The PathUtils class provides utility methods for working with file paths.
The PathUtils class contains static methods that allow you to perform various operations on file paths in the GroupDocs.Viewer component.
Example usage:
String combinedPath = PathUtils.combine("part", "of", "path");
String fileName = PathUtils.getFileName("/path/to/file.txt");
| Method | Description |
|---|---|
| combine(String[] params) | Combine paths parts using separator. |
| getFileName(String path) | Gets file name. |
public static String combine(String[] params)
Combine paths parts using separator.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| params | java.lang.String[] | the paths parts |
Returns: java.lang.String - the result path
public static String getFileName(String path)
Gets file name.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| path | java.lang.String | the path |
Returns: java.lang.String - the file name
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.