FileSystemInfo.Attributes プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > FileSystemInfo.Attributes プロパティの意味・解説 

FileSystemInfo.Attributes プロパティ

現在の FileSystemInfo の FileAttributes を取得または設定します

名前空間: System.IO
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Dim instance As FileSystemInfo
Dim value As FileAttributes

value = instance.Attributes

instance.Attributes = value
public FileAttributes Attributes { get; set;
 }
public:
property FileAttributes Attributes {
    FileAttributes get ();
    void set (FileAttributes value);
}
/** @property */
public FileAttributes get_Attributes ()

/** @property */
public void set_Attributes (FileAttributes
 value)
public function get Attributes
 () : FileAttributes

public function set Attributes
 (value : FileAttributes)

プロパティ
現在の FileSystemInfoFileAttributes

例外例外
例外種類条件

FileNotFoundException

指定したファイル存在しません。

DirectoryNotFoundException

割り当てられていないドライブであるなど、指定されパス無効です。

SecurityException

呼び出し元に必要なアクセス許可がありません。

ArgumentException

呼び出し元が、無効なファイル属性設定しようとしました

IOException

Refreshデータ初期化できません。

解説解説

FileSystemInfo では、最初に呼び出されたときに Refresh呼び出し属性取得などを行う API に関するキャッシュされた情報返します以降呼び出しでは、Refresh呼び出して最新情報取得する必要があります

このプロパティの値は、アーカイブ圧縮ディレクトリ、非表示オフライン読み取り専用システム一時ファイルの各属性フラグ組み合わせです。

その他の一般的な I/O タスクまたは関連する I/O タスクの例を次の表に示します

使用例使用例

Attributes プロパティの例を次に示します。このコード例は、FileSystemInfo クラストピック取り上げているコード例一部分です。

Sub DisplayFileSystemInfoAttributes(ByVal fsi
 As IO.FileSystemInfo)
    ' Assume that this entry is a file.
    Dim entryType As String
 = "File"

    ' Determine if this entry is really a directory.
    If (fsi.Attributes And FileAttributes.Directory)
 <> 0 Then
        entryType = "Directory"
    End If

    ' Show this entry's type, name, and creation date.
    Console.WriteLine("{0} entry {1} was created on {2:D}",
 _
        entryType, fsi.FullName, fsi.CreationTime)
End Sub
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からFileSystemInfo.Attributes プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からFileSystemInfo.Attributes プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からFileSystemInfo.Attributes プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

FileSystemInfo.Attributes プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



FileSystemInfo.Attributes プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS