FileAttribute 列舉
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
指出呼叫檔案存取函式時要使用的檔案屬性。
此列舉支援其成員值的位元組合。
public enum class FileAttribute
[System.Flags]
public enum FileAttribute
[<System.Flags>]
type FileAttribute =
Public Enum FileAttribute
- 繼承
- 屬性
欄位
| 名稱 | 值 | Description |
|---|---|---|
| Normal | 0 | 正常(預設為 |
| ReadOnly | 1 | 唯讀。 此構件等價於Visual Basic常數 |
| 2 | 隱藏著。 此構件等價於Visual Basic常數 |
|
| System | 4 | 系統檔案。 此構件等價於Visual Basic常數 |
| Volume | 8 | 體積標籤。 當 與 |
| Directory | 16 | 目錄或資料夾。 此構件等價於Visual Basic常數 |
| Archive | 32 | 檔案自上次備份以來有變動。 此構件等價於Visual Basic常數 |
備註
當你呼叫 Dir、 或 函SetAttr式時,你可以在程式碼中用FileAttribute列舉來取代GetAttr實際的值。
該 Attributes 論證取 FileAttribute 列舉成員。
執行檔案 I/O 操作時,該 My.Computer.FileSystem 物件比傳統檔案 I/O 方法提供更高的效能與易用性。 如需詳細資訊,請參閱FileSystem。