public class FileToolE extends FileToolT
Constructor and Description |
---|
FileToolE() |
Modifier and Type | Method and Description |
---|---|
static java.io.Serializable[] |
copy(java.lang.Object oFileSrc,
java.lang.Object oFileDest,
char chOverrideMode,
char chAttributesMode)
Simple ordinary file to ordinary file copy that returns a single result.
|
static java.util.List<java.io.Serializable[]> |
deepCopy(java.lang.Object oFileSrc,
java.lang.Object oFileDest,
char chOverrideMode,
boolean blFlagPrint)
Performs deep copy.
|
static java.util.List<java.io.Serializable[]> |
deepCopy(java.lang.Object oFileSrc,
java.lang.Object oFileDest,
char chOverrideMode,
int intDepthLimit,
char chChildFailureWay,
char chAttributesMode,
boolean blOnlyCopyDirs,
char chRecordMode,
boolean blFlagPrint)
Performs deep copy.
May need a flow picture to explain the inner logic. |
static java.util.List<java.io.Serializable[]> |
deepList(java.lang.Object oFile,
boolean blFlagPrint)
Performs deep list.
|
static java.util.List<java.io.Serializable[]> |
deepList(java.lang.Object oFile,
boolean blFlagDirsFirst,
int intDepthLimit,
char chChildFailureWay,
char chFileType,
char chRecordMode,
boolean blFlagPrint)
Performs deep list.
|
static java.util.Comparator<java.io.File> |
getFullNameComparator(boolean blDirectoriesFirst)
Gets a file name comparator that compares the full name (absolute paths)
of the files.
|
static java.lang.String |
getName(java.lang.Object oFile)
Gets the file name.
|
static boolean |
mkdir_(java.lang.Object oFile)
Deprecated.
Unformal, may change or remove soon.
|
static boolean |
mkdirP_(java.lang.Object oFile)
Deprecated.
Unformal, may change or remove soon.
|
static java.io.File |
o2f(java.lang.Object oFile)
Converts the incoming object to a file object.
|
static boolean |
rm_(java.lang.Object oFile)
Deprecated.
Unformal, may change or remove soon.
|
static java.io.Serializable[] |
rmForce__(java.lang.Object oFile)
Deprecated.
Unformal, may change or remove soon.
|
static java.io.Serializable[] |
rmForce__(java.lang.Object oFile,
int intDepthLimit)
Deprecated.
Unformal, may change or remove soon.
|
static void |
sortByName(java.io.File[] file1d,
boolean blDirectoriesFirst)
Sorts an array of files by there full name (absolute paths).
|
static void |
sortByName(java.util.List<java.io.File> listFiles,
boolean blDirectoriesFirst)
Sorts an array of files by there full name (absolute paths).
|
static java.lang.String[] |
splitNameByPostfix(java.lang.Object oFile)
Splits a file name into main part and postfix part by the final dot.
|
static boolean |
touch_(java.lang.Object oFile)
Deprecated.
Unformal, may change or remove soon.
|
static char[] |
userPermissionChars(java.lang.Object oFile)
Gets user permission of an existed file in a char array
formation.
|
static java.lang.String |
userPermissionString(java.lang.Object oFile)
Gets user permission of an existed file in a text string
formation.
|
deepMkdir_, deepRemove__, deepRemove_
public static java.io.File o2f(java.lang.Object oFile)
oFile
- - The incoming object.public static java.lang.String getName(java.lang.Object oFile)
oFile
- - Incoming file or file name.public static java.util.Comparator<java.io.File> getFullNameComparator(boolean blDirectoriesFirst)
blDirectoriesFirst
- - A boolean flag that indicates whether move directories to
the front.public static void sortByName(java.io.File[] file1d, boolean blDirectoriesFirst)
file1d
- - Incoming file array.blDirectoriesFirst
- - A boolean flag that indicates whether move directories to
the front.public static void sortByName(java.util.List<java.io.File> listFiles, boolean blDirectoriesFirst)
listFiles
- - Incoming file list.blDirectoriesFirst
- - A boolean flag that indicates whether move directories to
the front.public static java.lang.String[] splitNameByPostfix(java.lang.Object oFile)
oFile
- - Incoming file or file name.public static char[] userPermissionChars(java.lang.Object oFile)
oFile
- - Incoming file or file name.public static java.lang.String userPermissionString(java.lang.Object oFile)
oFile
- - Incoming file or file name.public static java.io.Serializable[] copy(java.lang.Object oFileSrc, java.lang.Object oFileDest, char chOverrideMode, char chAttributesMode)
oFileSrc
- Source file, directory or its name.oFileDest
- - Destination file, directory or its name. chOverrideMode
- - A character flag that indicates the override mode:chAttributesMode
- - A character flag that indicates the attributes mode:public static java.util.List<java.io.Serializable[]> deepCopy(java.lang.Object oFileSrc, java.lang.Object oFileDest, char chOverrideMode, boolean blFlagPrint)
oFileSrc
- - Source file, directory or its name.oFileDest
- - Destination file, directory or its name.chOverrideMode
- - A character flag that indicates the override mode:blFlagPrint
- - A boolean flag that indicates whether use
"System.out.println(...)" to print the course:public static java.util.List<java.io.Serializable[]> deepCopy(java.lang.Object oFileSrc, java.lang.Object oFileDest, char chOverrideMode, int intDepthLimit, char chChildFailureWay, char chAttributesMode, boolean blOnlyCopyDirs, char chRecordMode, boolean blFlagPrint)
oFileSrc
- - Source file, directory or its name.oFileDest
- - Destination file, directory or its name.chOverrideMode
- - A character flag that indicates the override mode:intDepthLimit
- - Depth limitation, would be automatically limited from 0 to
DEPTH_LIMIT.chChildFailureWay
- - A character flag that indicates the response way of the
failure(s) from recursive child operation(s):chAttributesMode
- - A character flag that indicates the attributes mode:blOnlyCopyDirs
- - A boolean flag that indicates whether only copy directories:
chRecordMode
- - A character flag that indicates the record mode: blFlagPrint
- - A boolean flag that indicates whether use
"System.out.println(...)" to print the course:public static java.util.List<java.io.Serializable[]> deepList(java.lang.Object oFile, boolean blFlagPrint)
oFile
- - File, directory or its name.blFlagPrint
- - A boolean flag that indicates whether use
"System.out.println(...)" to print the course:public static java.util.List<java.io.Serializable[]> deepList(java.lang.Object oFile, boolean blFlagDirsFirst, int intDepthLimit, char chChildFailureWay, char chFileType, char chRecordMode, boolean blFlagPrint)
oFile
- - File, directory or its name.blFlagDirsFirst
- - A boolean flag that indicates whether move directories to
the front.intDepthLimit
- - Depth limitation, would be automatically limited from 0 to
DEPTH_LIMIT.chChildFailureWay
- - A character flag that indicates the response way of the
failure(s) from recursive child operation(s):chFileType
- - A character flag that indicates the type of the
child files to be listed:chRecordMode
- - A character flag that indicates the record mode of child
results; self result would would always be recorded:blFlagPrint
- - A boolean flag that indicates whether use
"System.out.println(...)" to print the course:public static boolean touch_(java.lang.Object oFile)
oFile
- - Incoming file or file name.public static boolean mkdir_(java.lang.Object oFile)
oFile
- - Incoming directory or directory name.public static boolean mkdirP_(java.lang.Object oFile)
oFile
- - Incoming directory or directory name.public static boolean rm_(java.lang.Object oFile)
oFile
- - Incoming file or file name.public static java.io.Serializable[] rmForce__(java.lang.Object oFile)
oFile
- - Incoming file or file name.public static java.io.Serializable[] rmForce__(java.lang.Object oFile, int intDepthLimit)
oFile
- - Incoming file or file name.intDepthLimit
- - Depth limitation, would be automatically limited from 0 to
128.