Package org.apache.sshd.common.util.io
Class PathUtils
java.lang.Object
org.apache.sshd.common.util.io.PathUtils
- Author:
- Apache MINA SSHD Project
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Comparator<Path> static final Comparator<Path> static final UnaryEquator<Path> static final UnaryEquator<Path> static final char -
Method Summary
Modifier and TypeMethodDescriptionstatic StringBuilderstatic StringBuilderappendUserHome(StringBuilder sb, String userHome) static StringBuilderappendUserHome(StringBuilder sb, Path userHome) static Pathstatic StringnormalizePath(String path) Replaces leading '~' with user's HOME directory Replaces any forward slashes with the O/S directory separatorstatic intsafeCompareFilename(Path p1, Path p2, boolean caseSensitive) static voidsetUserHomeFolderResolver(Supplier<? extends Path> resolver) Set the reported value fromgetUserHomeFolder()
-
Field Details
-
BY_CASE_INSENSITIVE_FILENAME
-
EQ_CASE_INSENSITIVE_FILENAME
-
BY_CASE_SENSITIVE_FILENAME
-
EQ_CASE_SENSITIVE_FILENAME
-
HOME_TILDE_CHAR
public static final char HOME_TILDE_CHAR- See Also:
-
-
Method Details
-
safeCompareFilename
-
normalizePath
- Replaces leading '~' with user's HOME directory
- Replaces any forward slashes with the O/S directory separator
- Parameters:
path- Input path - ignored ifnull/empty/blank- Returns:
- Adjusted path
-
getUserHomeFolder
- Returns:
- The
Pathto the currently running user home - See Also:
-
setUserHomeFolderResolver
Set the reported value fromgetUserHomeFolder()- Parameters:
resolver- ThePathprovider to report - ifnullthen "user.home" system property will be used
-
appendUserHome
-
appendUserHome
-
appendUserHome
-