fs Constants

FILE_ACCESS

File-specific access rights

Name Val Win32
READ -2147483648 READ
READ_DATA 1 FILE_READ_DATA
LIST_DIRECTORY 1 FILE_READ_DATA
SYNCHRONIZE 1048576 SYNCHRONIZE
WRITE 1073741824 WRITE
GENERIC_READ 1179785 FILE_GENERIC_READ
GENERIC_EXECUTE 1179808 FILE_GENERIC_EXECUTE
GENERIC_WRITE 1179926 FILE_GENERIC_WRITE
READ_ATTRIBUTES 128 FILE_READ_ATTRIBUTES
STANDARD_RIGHTS_WRITE 131072 READ_CONTROL
READ_CONTROL 131072 READ_CONTROL
STANDARD_RIGHTS_READ 131072 READ_CONTROL
WRITE_EA 16 FILE_WRITE_EA
ACCESS_SYSTEM_SECURITY 16777216 ACCESS_SYSTEM_SECURITY
ADD_FILE 2 FILE_WRITE_DATA
WRITE_DATA 2 FILE_WRITE_DATA
ALL_ACCESS 2032639 FILE_ALL_ACCESS
WRITE_ATTRIBUTES 256 FILE_WRITE_ATTRIBUTES
WRITE_DAC 262144 WRITE_DAC
ALL 268435456 ALL
TRAVERSE 32 FILE_TRAVERSE
ADD_SUBDIRECTORY 4 FILE_CREATE_PIPE_INSTANCE
APPEND_DATA 4 FILE_CREATE_PIPE_INSTANCE
CREATE_PIPE_INSTANCE 4 FILE_CREATE_PIPE_INSTANCE
WRITE_OWNER 524288 WRITE_OWNER
EXECUTE 536870912 EXECUTE
DELETE_CHILD 64 FILE_DELETE_CHILD
DELETE 65536 DELETE
READ_EA 8 FILE_READ_EA
FILE_SHARE

Ways of sharing a file for reading, writing, &c.

Name Val Win32
READ 1 FILE_SHARE_READ
WRITE 2 FILE_SHARE_WRITE
DELETE 4 FILE_SHARE_DELETE
FILE_NOTIFY_CHANGE

Notification types to watch for when a file changes

Name Val Win32
FILE_NAME 1 FILE_NOTIFY_CHANGE_FILE_NAME
LAST_WRITE 16 FILE_NOTIFY_CHANGE_LAST_WRITE
DIR_NAME 2 FILE_NOTIFY_CHANGE_DIR_NAME
SECURITY 256 FILE_NOTIFY_CHANGE_SECURITY
ATTRIBUTES 4 FILE_NOTIFY_CHANGE_ATTRIBUTES
SIZE 8 FILE_NOTIFY_CHANGE_SIZE
FILE_ACTION

Results of a file change

Name Val Win32
ADDED 1 ADDED
REMOVED 2 REMOVED
MODIFIED 3 MODIFIED
RENAMED_OLD_NAME 4 RENAMED_OLD_NAME
RENAMED_NEW_NAME 5 RENAMED_NEW_NAME
FILE_ATTRIBUTE

Attributes applying to any file

Name Val Win32
READONLY 1 FILE_ATTRIBUTE_READONLY
REPARSE_POINT 1024 REPARSE_POINT
NORMAL 128 FILE_ATTRIBUTE_NORMAL
DIRECTORY 16 FILE_ATTRIBUTE_DIRECTORY
ENCRYPTED 16384 ENCRYPTED
HIDDEN 2 FILE_ATTRIBUTE_HIDDEN
COMPRESSED 2048 FILE_ATTRIBUTE_COMPRESSED
TEMPORARY 256 FILE_ATTRIBUTE_TEMPORARY
ARCHIVE 32 FILE_ATTRIBUTE_ARCHIVE
SYSTEM 4 FILE_ATTRIBUTE_SYSTEM
OFFLINE 4096 FILE_ATTRIBUTE_OFFLINE
SPARSE_FILE 512 SPARSE_FILE
VIRTUAL 65536 VIRTUAL
NOT_CONTENT_INDEXES 8192 NOT_CONTENT_INDEXES
PROGRESS

States within a file move/copy progress

Name Val Win32
CONTINUE 0 PROGRESS_CONTINUE
CANCEL 1 PROGRESS_CANCEL
STOP 2 PROGRESS_STOP
QUIET 3 PROGRESS_QUIET
MOVEFILE

Options when moving a file

Name Val Win32
REPLACE_EXISTING 1 MOVEFILE_REPLACE_EXISTING
CREATE_HARDLINK 16 MOVEFILE_CREATE_HARDLINK
COPY_ALLOWED 2 MOVEFILE_COPY_ALLOWED
FAIL_IF_NOT_TRACKABLE 32 MOVEFILE_FAIL_IF_NOT_TRACKABLE
DELAY_UNTIL_REBOOT 4 MOVEFILE_DELAY_UNTIL_REBOOT
WRITE_THROUGH 8 MOVEFILE_WRITE_THROUGH
FILE_FLAG

File flags

Name Val Win32
WRITE_THROUGH -2147483648 FILE_FLAG_WRITE_THROUGH
OVERLAPPED 1073741824 FILE_FLAG_OVERLAPPED
SEQUENTIAL_SCAN 134217728 FILE_FLAG_SEQUENTIAL_SCAN
POSIX_SEMANTICS 16777216 FILE_FLAG_POSIX_SEMANTICS
RANDOM_ACCESS 268435456 FILE_FLAG_RANDOM_ACCESS
BACKUP_SEMANTICS 33554432 FILE_FLAG_BACKUP_SEMANTICS
NO_BUFFERING 536870912 FILE_FLAG_NO_BUFFERING
DELETE_ON_CLOSE 67108864 FILE_FLAG_DELETE_ON_CLOSE
FILE_CREATION

Options when creating a file

Name Val Win32
CREATE_NEW 1 CREATE_NEW
CREATE_ALWAYS 2 CREATE_ALWAYS
OPEN_EXISTING 3 OPEN_EXISTING
OPEN_ALWAYS 4 OPEN_ALWAYS
TRUNCATE_EXISTING 5 TRUNCATE_EXISTING
VOLUME_FLAG

Characteristics of a volume

Name Val Win32
CASE_SENSITIVE_SEARCH 1 FILE_CASE_SENSITIVE_SEARCH
SEQUENTIAL_WRITE_ONCE 1048576 FILE_SEQUENTIAL_WRITE_ONCE
SUPPORTS_REPARSE_POINTS 128 FILE_SUPPORTS_REPARSE_POINTS
SUPPORTS_ENCRYPTION 131072 FILE_SUPPORTS_ENCRYPTION
FILE_COMPRESSION 16 FILE_FILE_COMPRESSION
CASE_PRESERVED_NAMES 2 FILE_CASE_PRESERVED_NAMES
SUPPORTS_TRANSACTIONS 2097152 FILE_SUPPORTS_TRANSACTIONS
SUPPORTS_REMOTE_STORAGE 256 FILE_SUPPORTS_REMOTE_STORAGE
NAMED_STREAMS 262144 FILE_NAMED_STREAMS
VOLUME_QUOTAS 32 FILE_VOLUME_QUOTAS
VOLUME_IS_COMPRESSED 32768 FILE_VOLUME_IS_COMPRESSED
UNICODE_ON_DISK 4 FILE_UNICODE_ON_DISK
READ_ONLY_VOLUME 524288 FILE_READ_ONLY_VOLUME
SUPPORTS_SPARSE_FILES 64 FILE_SUPPORTS_SPARSE_FILES
SUPPORTS_OBJECT_IDS 65536 FILE_SUPPORTS_OBJECT_IDS
PERSISTENT_ACLS 8 FILE_PERSISTENT_ACLS
DRIVE_TYPE

Types of drive

Name Val Win32
UNKNOWN 0 DRIVE_UNKNOWN
NO_ROOT_DIR 1 DRIVE_NO_ROOT_DIR
REMOVABLE 2 DRIVE_REMOVABLE
FIXED 3 DRIVE_FIXED
REMOTE 4 DRIVE_REMOTE
CDROM 5 DRIVE_CDROM
RAMDISK 6 DRIVE_RAMDISK
COMPRESSION_FORMAT

Ways in which a file can be compressed

Name Val Win32
NONE 0 NONE
DEFAULT 1 DEFAULT
LZNT1 2 LZNT1
FSCTL

Types of fsctl operation

Name Val Win32
REQUEST_OPLOCK_LEVEL_1 589824 FSCTL_REQUEST_OPLOCK_LEVEL_1
REQUEST_OPLOCK_LEVEL_2 589828 FSCTL_REQUEST_OPLOCK_LEVEL_2
REQUEST_BATCH_OPLOCK 589832 FSCTL_REQUEST_BATCH_OPLOCK
OPLOCK_BREAK_ACKNOWLEDGE 589836 FSCTL_OPLOCK_BREAK_ACKNOWLEDGE
OPBATCH_ACK_CLOSE_PENDING 589840 FSCTL_OPBATCH_ACK_CLOSE_PENDING
OPLOCK_BREAK_NOTIFY 589844 FSCTL_OPLOCK_BREAK_NOTIFY
LOCK_VOLUME 589848 FSCTL_LOCK_VOLUME
UNLOCK_VOLUME 589852 FSCTL_UNLOCK_VOLUME
DISMOUNT_VOLUME 589856 FSCTL_DISMOUNT_VOLUME
IS_VOLUME_MOUNTED 589864 FSCTL_IS_VOLUME_MOUNTED
IS_PATHNAME_VALID 589868 FSCTL_IS_PATHNAME_VALID
MARK_VOLUME_DIRTY 589872 FSCTL_MARK_VOLUME_DIRTY
QUERY_RETRIEVAL_POINTERS 589883 FSCTL_QUERY_RETRIEVAL_POINTERS
GET_COMPRESSION 589884 FSCTL_GET_COMPRESSION
MARK_AS_SYSTEM_HIVE 589903 FSCTL_MARK_AS_SYSTEM_HIVE
OPLOCK_BREAK_ACK_NO_2 589904 FSCTL_OPLOCK_BREAK_ACK_NO_2
INVALIDATE_VOLUMES 589908 FSCTL_INVALIDATE_VOLUMES
QUERY_FAT_BPB 589912 FSCTL_QUERY_FAT_BPB
REQUEST_FILTER_OPLOCK 589916 FSCTL_REQUEST_FILTER_OPLOCK
FILESYSTEM_GET_STATISTICS 589920 FSCTL_FILESYSTEM_GET_STATISTICS
GET_NTFS_VOLUME_DATA 589924 FSCTL_GET_NTFS_VOLUME_DATA
GET_NTFS_FILE_RECORD 589928 FSCTL_GET_NTFS_FILE_RECORD
GET_VOLUME_BITMAP 589935 FSCTL_GET_VOLUME_BITMAP
GET_RETRIEVAL_POINTERS 589939 FSCTL_GET_RETRIEVAL_POINTERS
MOVE_FILE 589940 FSCTL_MOVE_FILE
IS_VOLUME_DIRTY 589944 FSCTL_IS_VOLUME_DIRTY
ALLOW_EXTENDED_DASD_IO 589955 FSCTL_ALLOW_EXTENDED_DASD_IO
FIND_FILES_BY_SID 589967 FSCTL_FIND_FILES_BY_SID
SET_OBJECT_ID 589976 FSCTL_SET_OBJECT_ID
GET_OBJECT_ID 589980 FSCTL_GET_OBJECT_ID
DELETE_OBJECT_ID 589984 FSCTL_DELETE_OBJECT_ID
SET_REPARSE_POINT 589988 FSCTL_SET_REPARSE_POINT
GET_REPARSE_POINT 589992 FSCTL_GET_REPARSE_POINT
DELETE_REPARSE_POINT 589996 FSCTL_DELETE_REPARSE_POINT
ENUM_USN_DATA 590003 FSCTL_ENUM_USN_DATA
READ_USN_JOURNAL 590011 FSCTL_READ_USN_JOURNAL
SET_OBJECT_ID_EXTENDED 590012 FSCTL_SET_OBJECT_ID_EXTENDED
CREATE_OR_GET_OBJECT_ID 590016 FSCTL_CREATE_OR_GET_OBJECT_ID
SET_SPARSE 590020 FSCTL_SET_SPARSE
SET_ENCRYPTION 590039 FSCTL_SET_ENCRYPTION
ENCRYPTION_FSCTL_IO 590043 FSCTL_ENCRYPTION_FSCTL_IO
WRITE_RAW_ENCRYPTED 590047 FSCTL_WRITE_RAW_ENCRYPTED
READ_RAW_ENCRYPTED 590051 FSCTL_READ_RAW_ENCRYPTED
CREATE_USN_JOURNAL 590055 FSCTL_CREATE_USN_JOURNAL
READ_FILE_USN_DATA 590059 FSCTL_READ_FILE_USN_DATA
WRITE_USN_CLOSE_RECORD 590063 FSCTL_WRITE_USN_CLOSE_RECORD
EXTEND_VOLUME 590064 FSCTL_EXTEND_VOLUME
QUERY_USN_JOURNAL 590068 FSCTL_QUERY_USN_JOURNAL
DELETE_USN_JOURNAL 590072 FSCTL_DELETE_USN_JOURNAL
MARK_HANDLE 590076 FSCTL_MARK_HANDLE
SIS_COPYFILE 590080 FSCTL_SIS_COPYFILE
RECALL_FILE 590103 FSCTL_RECALL_FILE
FILE_PREFETCH 590112 FSCTL_FILE_PREFETCH
QUERY_SPARING_INFO 590136 FSCTL_QUERY_SPARING_INFO
QUERY_ON_DISK_VOLUME_INFO 590140 FSCTL_QUERY_ON_DISK_VOLUME_INFO
SET_VOLUME_COMPRESSION_STATE 590144 FSCTL_SET_VOLUME_COMPRESSION_STATE
SET_ZERO_ON_DEALLOCATION 590228 FSCTL_SET_ZERO_ON_DEALLOCATION
SET_REPAIR 590232 FSCTL_SET_REPAIR
GET_REPAIR 590236 FSCTL_GET_REPAIR
WAIT_FOR_REPAIR 590240 FSCTL_WAIT_FOR_REPAIR
INITIATE_REPAIR 590248 FSCTL_INITIATE_REPAIR
CSC_INTERNAL 590255 FSCTL_CSC_INTERNAL
SHRINK_VOLUME 590256 FSCTL_SHRINK_VOLUME
SET_SHORT_NAME_BEHAVIOR 590260 FSCTL_SET_SHORT_NAME_BEHAVIOR
DFSR_SET_GHOST_HANDLE_STATE 590264 FSCTL_DFSR_SET_GHOST_HANDLE_STATE
QUERY_PAGEFILE_ENCRYPTION 590312 FSCTL_QUERY_PAGEFILE_ENCRYPTION
SECURITY_ID_CHECK 606391 FSCTL_SECURITY_ID_CHECK
QUERY_ALLOCATED_RANGES 606415 FSCTL_QUERY_ALLOCATED_RANGES
READ_FROM_PLEX 606494 FSCTL_READ_FROM_PLEX
TXFS_QUERY_RM_INFORMATION 606536 FSCTL_TXFS_QUERY_RM_INFORMATION
TXFS_READ_BACKUP_INFORMATION 606560 FSCTL_TXFS_READ_BACKUP_INFORMATION
TXFS_GET_METADATA_INFO 606572 FSCTL_TXFS_GET_METADATA_INFO
TXFS_GET_TRANSACTED_VERSION 606576 FSCTL_TXFS_GET_TRANSACTED_VERSION
TXFS_TRANSACTION_ACTIVE 606604 FSCTL_TXFS_TRANSACTION_ACTIVE
TXFS_LIST_TRANSACTION_LOCKED_FILES 606688 FSCTL_TXFS_LIST_TRANSACTION_LOCKED_FILES
TXFS_LIST_TRANSACTIONS 606692 FSCTL_TXFS_LIST_TRANSACTIONS
SET_ZERO_DATA 622792 FSCTL_SET_ZERO_DATA
MAKE_MEDIA_COMPATIBLE 622896 FSCTL_MAKE_MEDIA_COMPATIBLE
SET_DEFECT_MANAGEMENT 622900 FSCTL_SET_DEFECT_MANAGEMENT
TXFS_MODIFY_RM 622916 FSCTL_TXFS_MODIFY_RM
TXFS_ROLLFORWARD_REDO 622928 FSCTL_TXFS_ROLLFORWARD_REDO
TXFS_ROLLFORWARD_UNDO 622932 FSCTL_TXFS_ROLLFORWARD_UNDO
TXFS_START_RM 622936 FSCTL_TXFS_START_RM
TXFS_SHUTDOWN_RM 622940 FSCTL_TXFS_SHUTDOWN_RM
TXFS_WRITE_BACKUP_INFORMATION 622948 FSCTL_TXFS_WRITE_BACKUP_INFORMATION
TXFS_CREATE_SECONDARY_RM 622952 FSCTL_TXFS_CREATE_SECONDARY_RM
TXFS_CREATE_MINIVERSION 622972 FSCTL_TXFS_CREATE_MINIVERSION
SET_COMPRESSION 639040 FSCTL_SET_COMPRESSION
SIS_LINK_FILES 639236 FSCTL_SIS_LINK_FILES
HSM_MSG 639240 FSCTL_HSM_MSG
HSM_DATA 639251 FSCTL_HSM_DATA

Previous topic

The Dir class

Next topic

ipc – Interprocess Communication

This Page