## Basic Types Basic Types — Standard Thunar-VFS types, defined for ease-of-use and portability. |

## Stability Level

Stable, unless otherwise indicated

## Synopsis

    #include <thunar-vfs/thunar-vfs.h>

    enum                ThunarVfsDeepCountFlags;
    enum                ThunarVfsFileType;
    enum                ThunarVfsFileMode;
    enum                ThunarVfsFileFlags;
    typedef             ThunarVfsFileDevice;
    typedef             ThunarVfsFileSize;
    typedef             ThunarVfsFileTime;
    typedef             ThunarVfsGroupId;
    typedef             ThunarVfsUserId;

## Description

Thunar-VFS defines a number of commonly used types to abstract the details of the underlying system.

## Details

### enum ThunarVfsDeepCountFlags

    typedef enum /*< flags >*/
    {
      THUNAR_VFS_DEEP_COUNT_FLAGS_NONE            = 0L,
      THUNAR_VFS_DEEP_COUNT_FLAGS_FOLLOW_SYMLINKS = 1L << 0,
    } ThunarVfsDeepCountFlags;

Additional flags to pass to `thunar_vfs_deep_count()`, which control the exact behavior of the job.

### enum ThunarVfsFileType

    typedef enum
    {
      THUNAR_VFS_FILE_TYPE_PORT       = 0160000 >> 12,
      THUNAR_VFS_FILE_TYPE_DOOR       = 0150000 >> 12,
      THUNAR_VFS_FILE_TYPE_SOCKET     = 0140000 >> 12,
      THUNAR_VFS_FILE_TYPE_SYMLINK    = 0120000 >> 12,
      THUNAR_VFS_FILE_TYPE_REGULAR    = 0100000 >> 12,
      THUNAR_VFS_FILE_TYPE_BLOCKDEV   = 0060000 >> 12,
      THUNAR_VFS_FILE_TYPE_DIRECTORY  = 0040000 >> 12,
      THUNAR_VFS_FILE_TYPE_CHARDEV    = 0020000 >> 12,
      THUNAR_VFS_FILE_TYPE_FIFO       = 0010000 >> 12,
      THUNAR_VFS_FILE_TYPE_UNKNOWN    = 0000000 >> 12,
    } ThunarVfsFileType;

Describes the type of a file.

`THUNAR_VFS_FILE_TYPE_PORT` | An event port (Solaris event framework).
`THUNAR_VFS_FILE_TYPE_DOOR` | A door (Solaris IPC mechanism).
`THUNAR_VFS_FILE_TYPE_SOCKET` | A unix domain socket.
`THUNAR_VFS_FILE_TYPE_SYMLINK` | A broken symlink, for which the target does not exist (if the target would exist, the ThunarVfsInfo object would have the type of the target).
`THUNAR_VFS_FILE_TYPE_REGULAR` | A regular file.
`THUNAR_VFS_FILE_TYPE_BLOCKDEV` | A block device node.
`THUNAR_VFS_FILE_TYPE_DIRECTORY` | A directory node.
`THUNAR_VFS_FILE_TYPE_CHARDEV` | A character device node.
`THUNAR_VFS_FILE_TYPE_FIFO` | A named FIFO.
`THUNAR_VFS_FILE_TYPE_UNKNOWN` | The exact type of the file could not be determined.

### enum ThunarVfsFileMode

    typedef enum /*< flags >*/
    {
      THUNAR_VFS_FILE_MODE_SUID       = 04000,
      THUNAR_VFS_FILE_MODE_SGID       = 02000,
      THUNAR_VFS_FILE_MODE_STICKY     = 01000,
      THUNAR_VFS_FILE_MODE_USR_ALL    = 00700,
      THUNAR_VFS_FILE_MODE_USR_READ   = 00400,
      THUNAR_VFS_FILE_MODE_USR_WRITE  = 00200,
      THUNAR_VFS_FILE_MODE_USR_EXEC   = 00100,
      THUNAR_VFS_FILE_MODE_GRP_ALL    = 00070,
      THUNAR_VFS_FILE_MODE_GRP_READ   = 00040,
      THUNAR_VFS_FILE_MODE_GRP_WRITE  = 00020,
      THUNAR_VFS_FILE_MODE_GRP_EXEC   = 00010,
      THUNAR_VFS_FILE_MODE_OTH_ALL    = 00007,
      THUNAR_VFS_FILE_MODE_OTH_READ   = 00004,
      THUNAR_VFS_FILE_MODE_OTH_WRITE  = 00002,
      THUNAR_VFS_FILE_MODE_OTH_EXEC   = 00001,
    } ThunarVfsFileMode;

Special flags and permissions of a filesystem entity.

### enum ThunarVfsFileFlags

    typedef enum /*< flags >*/
    {
      THUNAR_VFS_FILE_FLAGS_NONE       = 0,
      THUNAR_VFS_FILE_FLAGS_SYMLINK    = 1L << 0,
      THUNAR_VFS_FILE_FLAGS_EXECUTABLE = 1L << 1,
      THUNAR_VFS_FILE_FLAGS_HIDDEN     = 1L << 2,
      THUNAR_VFS_FILE_FLAGS_READABLE   = 1L << 3,
      THUNAR_VFS_FILE_FLAGS_WRITABLE   = 1L << 4,
    } ThunarVfsFileFlags;

Flags providing additional information about the file system entity.

### ThunarVfsFileDevice

    typedef dev_t ThunarVfsFileDevice;

Datatype to represent the device number of a file.

### ThunarVfsFileSize

    typedef gint64 ThunarVfsFileSize;

Datatype to represent file sizes (in bytes). The file size is always represented as a 64bit integer, even on system that do not support large files.

### ThunarVfsFileTime

    typedef time_t ThunarVfsFileTime;

Datatype to represent file times (in seconds).

### ThunarVfsGroupId

    typedef gid_t ThunarVfsGroupId;

Datatype to represent a group id.

### ThunarVfsUserId

    typedef uid_t ThunarVfsUserId;

Datatype to represent a user id.