com.trolltech.qt.core
Enum QDir.Filter

java.lang.Object
  extended by java.lang.Enum<QDir.Filter>
      extended by com.trolltech.qt.core.QDir.Filter
All Implemented Interfaces:
QtEnumerator, java.io.Serializable, java.lang.Comparable<QDir.Filter>
Enclosing class:
QDir

public static enum QDir.Filter
extends java.lang.Enum<QDir.Filter>
implements QtEnumerator

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:

ConstantValueDescription
Dirs1List directories that match the filters.
AllDirs1024List all directories; i.e. don't apply the filters to directory names.
Files2List files only.
Drives4List disk drives (ignored under Unix).
NoSymLinks8Do not list symbolic links (ignored by operating systems that don't support symbolic links).
NoDotAndDotDot4096Do not list the special entries "." and "..".
AllEntries7List directories, files, drives and symlinks (this does not list broken symlinks unless you specify System).
Readable16List files for which the application has read access. The Readable value needs to be combined with Dirs or Files.
Writable32List files for which the application has write access. The Writable value needs to be combined with Dirs or Files.
Executable64List files for which the application has execute access. The Executable value needs to be combined with Dirs or Files.
Modified128Only list files that have been modified (ignored under Unix).
Hidden256List hidden files (on Unix, files starting with a .).
System512List system files (on Unix, FIFOs, sockets and device files)
CaseSensitive2048The 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

Dirs

public static final QDir.Filter Dirs

List directories that match the filters.


Files

public static final QDir.Filter Files

List files only.


Drives

public static final QDir.Filter Drives

List disk drives (ignored under Unix).


NoSymLinks

public static final QDir.Filter NoSymLinks

Do not list symbolic links (ignored by operating systems that don't support symbolic links).


AllEntries

public static final QDir.Filter AllEntries

List directories, files, drives and symlinks (this does not list broken symlinks unless you specify System).


TypeMask

public static final QDir.Filter TypeMask
Internal.


Readable

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.


Writable

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.


Executable

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.


PermissionMask

public static final QDir.Filter PermissionMask
Internal.


Modified

public static final QDir.Filter Modified

Only list files that have been modified (ignored under Unix).


Hidden

public static final QDir.Filter Hidden

List hidden files (on Unix, files starting with a .).


System

public static final QDir.Filter System

List system files (on Unix, FIFOs, sockets and device files)


AccessMask

public static final QDir.Filter AccessMask
Internal.


AllDirs

public static final QDir.Filter AllDirs

List all directories; i.e. don't apply the filters to directory names.


CaseSensitive

public static final QDir.Filter CaseSensitive

The filter should be case sensitive if the file system is case sensitive.


NoDotAndDotDot

public static final QDir.Filter NoDotAndDotDot

Do not list the special entries "." and "..".


NoFilter

public static final QDir.Filter NoFilter
Internal.

Method Detail

values

public static final QDir.Filter[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(QDir.Filter c : QDir.Filter.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static QDir.Filter valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

value

public int value()
Specified by:
value in interface QtEnumerator

createQFlags

public static QDir.Filters createQFlags(QDir.Filter... values)

resolve

public static QDir.Filter resolve(int value)