다음을 통해 공유


Reading and Writing File Attributes (Windows CE 5.0)

Send Feedback

Windows CE provides a variety of functions to identify and modify the status of a file. You can set the parameters of a file when you first create the file by calling the CreateFile function. After you create the file, you can view the file attributes by using the GetFileAttributes function and you can modify the file attributes by using the SetFileAttributes function. The following table shows what file attributes you can interact with by using GetFileAttributes, SetFileAttributes, and CreateFile.

Flag CreateFile GetFile
attribute
SetFile
attribute
FILE_ATTRIBUTE_ARCHIVE X X X
FILE_ATTRIBUTE_COMPRESSED X X  
FILE_ATTRIBUTE_DIRECTORY   X  
FILE_ATTRIBUTE_ENCRYPTED   X  
FILE_ATTRIBUTE_HIDDEN X X X
FILE_ATTRIBUTE_INROM   X  
FILE_ATTRIBUTE_NORMAL X X X
FILE_ATTRIBUTE_OFFLINE   X X
FILE_ATTRIBUTE_READONLY X X X
FILE_ATTRIBUTE_REPARSE_POINT   X  
FILE_ATTRIBUTE_ROMMODULE X X  
FILE_ATTRIBUTE_SPARSE_FILE   X  
FILE_ATTRIBUTE_SYSTEM X X X
FILE_ATTRIBUTE_TEMPORARY   X  
FILE_FLAG_WRITE_THROUGH X    
FILE_FLAG_RANDOM_ACCESS X    
FILE_ATTRIBUTE_ROMSTATICREF   X  

You can also use the GetFileSize function to return the size of a file.

See Also

File System Operations

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.