Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

## com.trolltech.qt.core
Enum QDir.Filter

    java.lang.Object
      java.lang.Enum<QDir.Filter>
          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:

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.

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.
`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()` This function should return an integer value for the enum values of the enumeration that implements this interface.
`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.

### 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()

  Description copied from interface: `QtEnumerator`
  This function should return an integer value for the enum values of the enumeration that implements this interface.

  Specified by:
    `value` in interface `QtEnumerator`

### createQFlags

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

### resolve

    public static QDir.Filter resolve(int value)

Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD