class FileComparators extends Object
Modifier and Type | Field and Description |
---|---|
(package private) static Comparator<File> |
FILE_LAST_MODIFIED
Sorts files according to the last-modified time.
|
(package private) static Comparator<File> |
FILE_NAME
Sorts files alphabetically according to the file name.
|
(package private) static Comparator<File> |
FILE_TYPE
Sorts files according to file type.
|
Modifier and Type | Method and Description |
---|---|
(package private) static Comparator<File> |
dotDotdotRest(File relativeTo)
Sorts .
|
(package private) static Comparator<File> |
relativeFileName(File relativeTo)
Sorts files alphabetically according to the relative file name from the
specified root to the actual file.
|
(package private) static Comparator<File> |
timeAndRelativeFileName(File relativeTo)
Sorts files according to the last modified time (last touched files
first) and then by relative file name.
|
(package private) static Comparator<File> |
typeAndRelativeFileName(File relativeTo)
Sorts files according to file type and then by relative file name.
|
static Comparator<File> FILE_TYPE
static Comparator<File> FILE_NAME
static Comparator<File> FILE_LAST_MODIFIED
static Comparator<File> relativeFileName(File relativeTo)
relativeTo
- the root for the relative file namestatic Comparator<File> dotDotdotRest(File relativeTo)
relativeTo
- the root to evaluate the . and .. filesstatic Comparator<File> typeAndRelativeFileName(File relativeTo)
relativeTo
- the root for the relative file namestatic Comparator<File> timeAndRelativeFileName(File relativeTo)
relativeTo
- the root for the relative file nameCopyright © 2024. All rights reserved.