Package | Description |
---|---|
org.apache.commons.io |
Provides classes for working with streams, readers, writers and files.
|
org.apache.commons.io.comparator |
Provides various
Comparator implementations
for File s and Path . |
org.apache.commons.io.filefilter | |
org.apache.commons.io.monitor |
Provides a component for monitoring file system events (directory and file create, update and delete events).
|
Modifier and Type | Method and Description |
---|---|
static IOCase |
IOCase.forName(java.lang.String name)
Factory method to create an IOCase from a name.
|
static IOCase |
IOCase.value(IOCase value,
IOCase defaultValue)
Returns the given value if not-null, the defaultValue if null.
|
static IOCase |
IOCase.valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static IOCase[] |
IOCase.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
FilenameUtils.equals(java.lang.String fileName1,
java.lang.String fileName2,
boolean normalize,
IOCase ioCase)
Checks whether two fileNames are equal, optionally normalizing and providing
control over the case-sensitivity.
|
static boolean |
IOCase.isCaseSensitive(IOCase ioCase)
Tests for cases sensitivity in a null-safe manner.
|
static IOCase |
IOCase.value(IOCase value,
IOCase defaultValue)
Returns the given value if not-null, the defaultValue if null.
|
static boolean |
FilenameUtils.wildcardMatch(java.lang.String fileName,
java.lang.String wildcardMatcher,
IOCase ioCase)
Checks a fileName to see if it matches the specified wildcard matcher
allowing control over case-sensitivity.
|
Modifier and Type | Field and Description |
---|---|
private IOCase |
ExtensionFileComparator.ioCase
Whether the comparison is case-sensitive.
|
private IOCase |
NameFileComparator.ioCase
Whether the comparison is case-sensitive.
|
private IOCase |
PathFileComparator.ioCase
Whether the comparison is case-sensitive.
|
Constructor and Description |
---|
ExtensionFileComparator(IOCase ioCase)
Constructs a file extension comparator instance with the specified case-sensitivity.
|
NameFileComparator(IOCase ioCase)
Constructs a file name comparator instance with the specified case-sensitivity.
|
PathFileComparator(IOCase ioCase)
Constructs a file path comparator instance with the specified case-sensitivity.
|
Modifier and Type | Field and Description |
---|---|
private IOCase |
NameFileFilter.ioCase
Whether the comparison is case-sensitive.
|
private IOCase |
SuffixFileFilter.ioCase
Whether the comparison is case-sensitive.
|
private IOCase |
WildcardFileFilter.ioCase
Whether the comparison is case-sensitive.
|
private IOCase |
WildcardFileFilter.Builder.ioCase
Whether the comparison is case-sensitive.
|
private IOCase |
PrefixFileFilter.isCase
Whether the comparison is case-sensitive.
|
Modifier and Type | Method and Description |
---|---|
private IOCase |
NameFileFilter.toIOCase(IOCase ioCase) |
Modifier and Type | Method and Description |
---|---|
static IOFileFilter |
FileFilterUtils.nameFileFilter(java.lang.String name,
IOCase ioCase)
Returns a filter that returns true if the file name matches the specified text.
|
static IOFileFilter |
FileFilterUtils.prefixFileFilter(java.lang.String prefix,
IOCase ioCase)
Returns a filter that returns true if the file name starts with the specified text.
|
WildcardFileFilter.Builder |
WildcardFileFilter.Builder.setIoCase(IOCase ioCase)
Sets how to handle case sensitivity, null means case-sensitive.
|
static IOFileFilter |
FileFilterUtils.suffixFileFilter(java.lang.String suffix,
IOCase ioCase)
Returns a filter that returns true if the file name ends with the specified text.
|
private static int |
RegexFileFilter.toFlags(IOCase ioCase)
Converts IOCase to Pattern compilation flags.
|
private IOCase |
NameFileFilter.toIOCase(IOCase ioCase) |
Constructor and Description |
---|
NameFileFilter(java.util.List<java.lang.String> names,
IOCase ioCase)
Constructs a new name file filter for a list of names specifying case-sensitivity.
|
NameFileFilter(java.lang.String[] names,
IOCase ioCase)
Constructs a new name file filter for an array of names specifying case-sensitivity.
|
NameFileFilter(java.lang.String name,
IOCase ioCase)
Constructs a new name file filter specifying case-sensitivity.
|
PrefixFileFilter(java.util.List<java.lang.String> prefixes,
IOCase ioCase)
Constructs a new Prefix file filter for a list of prefixes
specifying case-sensitivity.
|
PrefixFileFilter(java.lang.String[] prefixes,
IOCase ioCase)
Constructs a new Prefix file filter for any of an array of prefixes
specifying case-sensitivity.
|
PrefixFileFilter(java.lang.String prefix,
IOCase ioCase)
Constructs a new Prefix file filter for a single prefix
specifying case-sensitivity.
|
RegexFileFilter(java.lang.String pattern,
IOCase ioCase)
Constructs a new regular expression filter with the specified flags case sensitivity.
|
SuffixFileFilter(java.util.List<java.lang.String> suffixes,
IOCase ioCase)
Constructs a new Suffix file filter for a list of suffixes
specifying case-sensitivity.
|
SuffixFileFilter(java.lang.String[] suffixes,
IOCase ioCase)
Constructs a new Suffix file filter for an array of suffixes
specifying case-sensitivity.
|
SuffixFileFilter(java.lang.String suffix,
IOCase ioCase)
Constructs a new Suffix file filter for a single extension
specifying case-sensitivity.
|
WildcardFileFilter(IOCase ioCase,
java.lang.String... wildcards)
Constructs a new wildcard filter for an array of wildcards specifying case-sensitivity.
|
WildcardFileFilter(java.util.List<java.lang.String> wildcards,
IOCase ioCase)
Deprecated.
|
WildcardFileFilter(java.lang.String[] wildcards,
IOCase ioCase)
Deprecated.
|
WildcardFileFilter(java.lang.String wildcard,
IOCase ioCase)
Deprecated.
|
Constructor and Description |
---|
FileAlterationObserver(FileEntry rootEntry,
java.io.FileFilter fileFilter,
IOCase ioCase)
Constructs an observer for the specified directory, file filter and file comparator.
|
FileAlterationObserver(java.io.File directory,
java.io.FileFilter fileFilter,
IOCase ioCase)
Constructs an observer for the specified directory, file filter and
file comparator.
|
FileAlterationObserver(java.lang.String directoryName,
java.io.FileFilter fileFilter,
IOCase ioCase)
Constructs an observer for the specified directory, file filter and file comparator.
|