How to: Determine a File's Attributes in Visual Basic
This table shows the members of FileAttributes.
The file's archive status. Applications use this attribute to mark files for backup or removal.
The file is compressed.
This member is not used at this time.
The file is a directory.
All of the data in the file is encrypted.
The file is hidden and will not be displayed in an ordinary directory listing.
The file has no other attributes set.
The file will not be indexed by the operating system's content indexing service.
The file is offline. The data in the file is not immediately available.
The file is read-only.
The file contains a reparse point, which is a block of user-defined data.
The file is a sparse file. Sparse files are usually large files containing data that is mostly zeroes.
The file is a system file. The file is part of the operating system or is used exclusively by the operating system.
The file is temporary. File systems attempt to keep all of the data in memory for quicker access, rather than flushing the data back to mass storage. A temporary file should be deleted by the application as soon as it is no longer needed.
To determine if a file is encrypted
Query FileAttributes. This example determines if the file is encrypted and displays a result accordingly.