Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1.77 KB

file-attribute-constants.md

File metadata and controls

37 lines (28 loc) · 1.77 KB
descriptiontitlems.datef1_keywordshelpviewer_keywordsms.assetid
Learn more about: File Attribute Constants
File Attribute Constants
11/04/2016
_A_ARCH
_A_HIDDEN
_A_NORMAL
_A_RDONLY
_A_SUBDIR
_A_SYSTEM
CORECRT_IO/_A_ARCH
CORECRT_IO/_A_HIDDEN
CORECRT_IO/_A_NORMAL
CORECRT_IO/_A_RDONLY
CORECRT_IO/_A_SUBDIR
CORECRT_IO/_A_SYSTEM
c.constants.file
constants [C++], file attributes
file attribute constants [C++]
_A_SYSTEM constant
files [C++], file attribute constants
_A_SUBDIR constant
_A_ARCH constant
_A_NORMAL constant
_A_HIDDEN constant
_A_RDONLY constant
8dc8ccb9-99f5-446b-876c-7ebecc2f764f

File attribute constants

Syntax

#include<io.h>

Remarks

These constants specify the current attributes of the file or directory specified by the function.

The attributes are represented by the following manifest constants:

ConstantDescription
_A_ARCHArchive. Set whenever the file is changed, and cleared by the BACKUP command. Value: 0x20
_A_HIDDENHidden file. Not normally seen with the DIR command, unless the /AH option is used. Returns information about both normal files and files with this attribute. Value: 0x02
_A_NORMALNormal. File can be read or written to without restriction. Value: 0x00
_A_RDONLYRead-only. File can't be opened for writing, and a file with the same name can't be created. Value: 0x01
_A_SUBDIRSubdirectory. Value: 0x10
_A_SYSTEMSystem file. Not normally seen with the DIR command, unless the /AS option is used. Value: 0x04

Multiple constants can be combined with the OR operator (|).

See also

Filename search functions
Global constants

close