Package org.apache.sshd.common.util.io
Class PathUtils
- java.lang.Object
-
- org.apache.sshd.common.util.io.PathUtils
-
public final class PathUtils extends Object
- Author:
- Apache MINA SSHD Project
-
-
Field Summary
Fields Modifier and Type Field Description static Comparator<Path>BY_CASE_INSENSITIVE_FILENAMEstatic Comparator<Path>BY_CASE_SENSITIVE_FILENAMEstatic UnaryEquator<Path>EQ_CASE_INSENSITIVE_FILENAMEstatic UnaryEquator<Path>EQ_CASE_SENSITIVE_FILENAMEstatic charHOME_TILDE_CHAR
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringBuilderappendUserHome(StringBuilder sb)static StringBuilderappendUserHome(StringBuilder sb, String userHome)static StringBuilderappendUserHome(StringBuilder sb, Path userHome)static PathgetUserHomeFolder()static 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)
-
-
-
Field Detail
-
BY_CASE_INSENSITIVE_FILENAME
public static final Comparator<Path> BY_CASE_INSENSITIVE_FILENAME
-
EQ_CASE_INSENSITIVE_FILENAME
public static final UnaryEquator<Path> EQ_CASE_INSENSITIVE_FILENAME
-
BY_CASE_SENSITIVE_FILENAME
public static final Comparator<Path> BY_CASE_SENSITIVE_FILENAME
-
EQ_CASE_SENSITIVE_FILENAME
public static final UnaryEquator<Path> EQ_CASE_SENSITIVE_FILENAME
-
HOME_TILDE_CHAR
public static final char HOME_TILDE_CHAR
- See Also:
- Constant Field Values
-
-
Method Detail
-
normalizePath
public static String normalizePath(String path)
- 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
public static Path getUserHomeFolder()
- Returns:
- The
Pathto the currently running user home
-
appendUserHome
public static StringBuilder appendUserHome(StringBuilder sb)
-
appendUserHome
public static StringBuilder appendUserHome(StringBuilder sb, Path userHome)
-
appendUserHome
public static StringBuilder appendUserHome(StringBuilder sb, String userHome)
-
-