## 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.

`THUNAR_VFS_DEEP_COUNT_FLAGS_NONE` | no special behavior.
`THUNAR_VFS_DEEP_COUNT_FLAGS_FOLLOW_SYMLINKS` | follow symlinks to folders. If this flag is set, the job will also count symlinked folders recursively.

### 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.

`THUNAR_VFS_FILE_MODE_SUID` | SUID bit.
`THUNAR_VFS_FILE_MODE_SGID` | SGID bit.
`THUNAR_VFS_FILE_MODE_STICKY` | Sticky bit.
`THUNAR_VFS_FILE_MODE_USR_ALL` | Owner can do everything.
`THUNAR_VFS_FILE_MODE_USR_READ` | Owner can read the file.
`THUNAR_VFS_FILE_MODE_USR_WRITE` | Owner can write the file.
`THUNAR_VFS_FILE_MODE_USR_EXEC` | Owner can execute the file.
`THUNAR_VFS_FILE_MODE_GRP_ALL` | Owner group can do everything.
`THUNAR_VFS_FILE_MODE_GRP_READ` | Owner group can read the file.
`THUNAR_VFS_FILE_MODE_GRP_WRITE` | Owner group can write the file.
`THUNAR_VFS_FILE_MODE_GRP_EXEC` | Owner group can execute the file.
`THUNAR_VFS_FILE_MODE_OTH_ALL` | Others can do everything.
`THUNAR_VFS_FILE_MODE_OTH_READ` | Others can read the file.
`THUNAR_VFS_FILE_MODE_OTH_WRITE` | Others can write the file.
`THUNAR_VFS_FILE_MODE_OTH_EXEC` | Others can execute the file.

### 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.

`THUNAR_VFS_FILE_FLAGS_NONE` | No additional information available.
`THUNAR_VFS_FILE_FLAGS_SYMLINK` | The file is a symlink. Whether or not the info fields refer to the symlink itself or the linked file, depends on whether the symlink is broken or not.
`THUNAR_VFS_FILE_FLAGS_EXECUTABLE` | The file can most probably be executed by `thunar_vfs_info_execute()`.
`THUNAR_VFS_FILE_FLAGS_HIDDEN` | The file should not be displayed normally, but only if the user requests to display hidden files. Hidden files start with a dot character ('.') or end with a tilde character ('~').
`THUNAR_VFS_FILE_FLAGS_READABLE` | The file can most probably be read by the current user.
`THUNAR_VFS_FILE_FLAGS_WRITABLE` | The file can most probably be written by the current user.

### 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.