|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<QDir.Filter>
com.trolltech.qt.core.QDir.Filter
public static enum QDir.Filter
This enum describes the filtering options available to QDir; e.g. for entryList and entryInfoList. The filter value is specified by combining values from the following list using the bitwise OR operator:
Constant | Value | Description |
---|---|---|
Dirs | 1 | List directories that match the filters. |
AllDirs | 1024 | List all directories; i.e. don't apply the filters to directory names. |
Files | 2 | List files only. |
Drives | 4 | List disk drives (ignored under Unix). |
NoSymLinks | 8 | Do not list symbolic links (ignored by operating systems that don't support symbolic links). |
NoDotAndDotDot | 4096 | Do not list the special entries "." and "..". |
AllEntries | 7 | List directories, files, drives and symlinks (this does not list broken symlinks unless you specify System). |
Readable | 16 | List files for which the application has read access. The Readable value needs to be combined with Dirs or Files. |
Writable | 32 | List files for which the application has write access. The Writable value needs to be combined with Dirs or Files. |
Executable | 64 | List files for which the application has execute access. The Executable value needs to be combined with Dirs or Files. |
Modified | 128 | Only list files that have been modified (ignored under Unix). |
Hidden | 256 | List hidden files (on Unix, files starting with a .). |
System | 512 | List system files (on Unix, FIFOs, sockets and device files) |
CaseSensitive | 2048 | The filter should be case sensitive if the file system is case sensitive. |
Functions that use Filter enum values to filter lists of files and directories will include symbolic links to files and directories unless you set the NoSymLinks value.
A default constructed QDir will not filter out files based on their permissions, so entryList and entryInfoList will return all files that are readable, writable, executable, or any combination of the three. This makes the default easy to write, and at the same time useful.
For example, setting the Readable, Writable, and Files flags allows all files to be listed for which the application has read access, write access or both. If the Dirs and Drives flags are also included in this combination then all drives, directories, all files that the application can read, write, or execute, and symlinks to such files/directories can be listed.
To retrieve the permissons for a directory, use the entryInfoList function to get the associated QFileInfo objects and then use the QFileInfo::permissons() to obtain the permissions and ownership for each file.
Enum Constant Summary | |
---|---|
AccessMask
Internal. |
|
AllDirs
List all directories; i.e. don't apply the filters to directory names. |
|
AllEntries
List directories, files, drives and symlinks (this does not list broken symlinks unless you specify System). |
|
CaseSensitive
The filter should be case sensitive if the file system is case sensitive. |
|
Dirs
List directories that match the filters. |
|
Drives
List disk drives (ignored under Unix). |
|
Executable
List files for which the application has execute access. |
|
Files
List files only. |
|
Hidden
List hidden files (on Unix, files starting with a .). |
|
Modified
Only list files that have been modified (ignored under Unix). |
|
NoDotAndDotDot
Do not list the special entries "." and "..". |
|
NoFilter
Internal. |
|
NoSymLinks
Do not list symbolic links (ignored by operating systems that don't support symbolic links). |
|
PermissionMask
Internal. |
|
Readable
List files for which the application has read access. |
|
System
List system files (on Unix, FIFOs, sockets and device files) |
|
TypeMask
Internal. |
|
Writable
List files for which the application has write access. |
Method Summary | |
---|---|
static QDir.Filters |
createQFlags(QDir.Filter... values)
|
static QDir.Filter |
resolve(int value)
|
int |
value()
|
static QDir.Filter |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static QDir.Filter[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final QDir.Filter Dirs
List directories that match the filters.
public static final QDir.Filter Files
List files only.
public static final QDir.Filter Drives
List disk drives (ignored under Unix).
public static final QDir.Filter NoSymLinks
Do not list symbolic links (ignored by operating systems that don't support symbolic links).
public static final QDir.Filter AllEntries
List directories, files, drives and symlinks (this does not list broken symlinks unless you specify System).
public static final QDir.Filter TypeMask
public static final QDir.Filter Readable
List files for which the application has read access. The Readable value needs to be combined with Dirs or Files.
public static final QDir.Filter Writable
List files for which the application has write access. The Writable value needs to be combined with Dirs or Files.
public static final QDir.Filter Executable
List files for which the application has execute access. The Executable value needs to be combined with Dirs or Files.
public static final QDir.Filter PermissionMask
public static final QDir.Filter Modified
Only list files that have been modified (ignored under Unix).
public static final QDir.Filter Hidden
List hidden files (on Unix, files starting with a .).
public static final QDir.Filter System
List system files (on Unix, FIFOs, sockets and device files)
public static final QDir.Filter AccessMask
public static final QDir.Filter AllDirs
List all directories; i.e. don't apply the filters to directory names.
public static final QDir.Filter CaseSensitive
The filter should be case sensitive if the file system is case sensitive.
public static final QDir.Filter NoDotAndDotDot
Do not list the special entries "." and "..".
public static final QDir.Filter NoFilter
Method Detail |
---|
public static final QDir.Filter[] values()
for(QDir.Filter c : QDir.Filter.values()) System.out.println(c);
public static QDir.Filter valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namepublic int value()
value
in interface QtEnumerator
public static QDir.Filters createQFlags(QDir.Filter... values)
public static QDir.Filter resolve(int value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |