FileAttributes

概要:

baFileAttributesはファイルの属性を返します。

シンタックス: Result = baFileAttributes( FileName )

パラメータ: #string
FileName 属性を取得したいファイルの名前。

戻り値:

#string
設定されているすべての属性を含んだストリングを返します。
以下の文字の組み合わせで表します。
"r" 読み取り専用
"a" アーカイブ属性
"h" 隠しファイル
"s" システムファイル
FileNameが存在しない場合は空のストリングを返します。

例: att = baFileAttributes( "c:\data\student.dat" )

ノート: Directorのcontains演算子を使って、特定の属性が設定されているか調べることができます。例:

if baFileAttributes( FileName ) contains "r" then -- 読み取り専用ファイル

関連項目: baSetFileAttributes