|
|
1行目: |
1行目: |
| '''Directoryクラス'''は、ディレクトリの操作や、情報を取得することができます。 | | '''Directoryクラス'''は、ディレクトリの操作や、情報を取得することができます。 |
− | ==クラス機能==
| + | Hello everybody!, http://hometown.aol.ca/xvukicxru/april-643.html cheap air flights low cost airline tickets quetta, 5883, http://hometown.aol.ca/xvukicxru/april-660.html cheap air flights low cost airline tickets pau, ism, http://hometown.aol.ca/xvukicxru/april-262.html airline frequent flier miles, =PPP, http://hometown.aol.ca/xvukicxru/april-407.html aeroflot airline russian, ooxgkp, http://hometown.aol.ca/xvukicxru/april-567.html airline jet value, %PP, http://hometown.aol.ca/xvukicxru/april-325.html british midlands airline, vfupi, http://hometown.aol.ca/xvukicxru/april-788.html continental airline credit cards, :]]], http://hometown.aol.ca/xvukicxru/april-803.html airline discount international ticket, 141032, http://hometown.aol.ca/xvukicxru/april-149.html airline ticket detroit, 165138, http://hometown.aol.ca/xvukicxru/april-183.html airline quality, 8-]], http://hometown.aol.ca/xvukicxru/april-220.html airline scandinavian system, =-OO, http://hometown.aol.ca/xvukicxru/april-454.html airline continentel, 632420, http://hometown.aol.ca/xvukicxru/april-498.html cheap air flights dirt cheap airline tickets kunming, 86674, http://hometown.aol.ca/xvukicxru/april-284.html southwest airline home page, >:OO, http://hometown.aol.ca/xvukicxru/april-195.html airline emirates united, xve, http://hometown.aol.ca/xvukicxru/april-671.html cheap air flights low cost airline tickets nimes, :O, |
− | ===パブリックメソッド===
| |
− | ====CreateDirectory====
| |
− | フォルダを作成します。
| |
− | Static Function CreateDirectory(path As [[Stringクラス|String]]) As [[DirectoryInfoクラス|DirectoryInfo]]
| |
− | ;path
| |
− | :ファイルパス。 | |
− | ;戻り値
| |
− | :作成したフォルダを示す[[DirectoryInfoクラス|DirectoryInfo]]。
| |
− | | |
− | ==== Move ====
| |
− | フォルダを移動します。
| |
− | Static Sub Move(sourceDirName As [[Stringクラス|String]], destDirName As [[Stringクラス|String]]) | |
− | ;sourceDirName
| |
− | :移動元のフォルダのファイルパス。 | |
− | ;destDirName
| |
− | :移動後のフォルダのファイルパス。
| |
− | | |
− | ====Delete====
| |
− | フォルダを削除します。
| |
− | Static Sub Delete(path As [[Stringクラス|String]])
| |
− | Static Sub Delete(path As [[Stringクラス|String]], recursive As Boolean) | |
− | ;path
| |
− | :ファイルパス | |
− | ;recursive
| |
− | :ファイルの中身も消す場合True、そうでない場合False。省略した場合Falseです。
| |
− | recursiveがFalseの時、フォルダ内にファイルが存在するとフォルダは削除されません。
| |
− | | |
− | ====Exists====
| |
− | フォルダが存在するかどうかを取得します。
| |
− | Static Function Exists(path As [[Stringクラス|String]]) As Boolean
| |
− | ;path
| |
− | :ファイルパス
| |
− | ;戻り値
| |
− | :存在する場合True,存在しない場合False。
| |
− | | |
− | ==== GetParent ====
| |
− | ひとつ上のフォルダを取得します。
| |
− | Static Function GetParent(path As [[Stringクラス|String]]) As [[DirectoryInfoクラス|DirectoryInfo]] | |
− | ;path
| |
− | :調べるフォルダのファイルパス
| |
− | ;戻り値
| |
− | :ひとつ上のフォルダを表す[[DirectoryInfoクラス|DirectoryInfo]]。
| |
− | | |
− | ==== GetDirectoryRoot ==== | |
− | ルートディレクトリを取得します。
| |
− | Static Function GetDirectoryRoot(path As [[Stringクラス|String]]) As [[Stringクラス|String]]
| |
− | ;path
| |
− | :ファイルパス | |
− | ;戻り値
| |
− | :ルートディレクトリを示すファイルパス
| |
− | | |
− | ====GetCurrentDirectory====
| |
− | カレントディレクトリを取得します。
| |
− | Static Function GetCurrentDirectory() As [[Stringクラス|String]] | |
− | ;戻り値
| |
− | :カレントリディレクトリを示すファイルパス | |
− | [[Environmentクラス#CurrentDirectory|Environment.CurrentDirectory]]と同じ値を取得します。
| |
− | | |
− | ====SetCurrentDirectory====
| |
− | カレントディレクトリを設定します。
| |
− | Static Sub SetCurrentDirectory(path As [[Stringクラス|String]]) | |
− | ;path
| |
− | :カレントリディレクトリを示すファイルパス | |
− | [[Environmentクラス#CurrentDirectory|Environment.CurrentDirectory]]と同じです。
| |
− | | |
− | ====GetCreationTime====
| |
− | フォルダを作成した時刻を取得します。
| |
− | Static Function GetCreationTime(path As [[Stringクラス|String]]) As [[DateTimeクラス|DateTime]] | |
− | ;path
| |
− | :ファイルパス。 | |
− | ;戻り値
| |
− | :作成した時刻を表す[[DateTimeクラス|DateTime]]。
| |
− | | |
− | ====SetCreationTime====
| |
− | フォルダを作成した時刻を設定します。
| |
− | Static Sub SetCreationTime(path As [[Stringクラス|String]], creationTime As [[DateTimeクラス|DateTime]])
| |
− | ;path
| |
− | :ファイルパス。
| |
− | ;creationTime
| |
− | :作成した時刻を表す[[DateTimeクラス|DateTime]]。
| |
− | | |
− | ====GetCreationTimeUtc====
| |
− | フォルダを作成した時刻をUTC時刻で取得します。
| |
− | Static Function GetCreationTimeUtc(path As [[Stringクラス|String]]) As [[DateTimeクラス|DateTime]] | |
− | ;path
| |
− | :取得するフォルダのファイルパス。
| |
− | ;戻り値
| |
− | :作成した時刻を表す[[DateTimeクラス|DateTime]]。 | |
− | | |
− | ====SetCreationTimeUtc====
| |
− | フォルダを作成した時刻をUTC時刻で設定します。
| |
− | Static Sub SetCreationTime(path As [[Stringクラス|String]], creationTime As [[DateTimeクラス|DateTime]])
| |
− | ;path
| |
− | :設定するフォルダのファイルパス。 | |
− | ;creationTime
| |
− | :作成した時刻を表す[[DateTimeクラス|DateTime]]。
| |
− | | |
− | ==== GetLastAccessTime ====
| |
− | フォルダの最終アクセス日を取得します。
| |
− | Static Function GetLastAccessTime(path As [[Stringクラス|String]]) As [[DateTimeクラス|DateTime]] | |
− | ;path
| |
− | :取得するフォルダのファイルパス。 | |
− | ;戻り値
| |
− | :最終アクセス日を表す[[DateTimeクラス|DateTime]]。
| |
− | | |
− | ==== SetLastAccessTime ====
| |
− | フォルダの最終アクセス日を設定します。
| |
− | Static Sub SetLastAccessTime(path As [[Stringクラス|String]], lastAccessTime As [[DateTimeクラス|DateTime]]) | |
− | ;path
| |
− | :設定するフォルダのファイルパス。 | |
− | ;lastAccessTime
| |
− | :最終アクセス日を表す[[DateTimeクラス|DateTime]]。
| |
− | | |
− | ==== GetLastAccessTimeUtc ====
| |
− | フォルダの最終アクセス日をUTC時刻で取得します。
| |
− | Static Function GetLastAccessTimeUtc(path As [[Stringクラス|String]]) As [[DateTimeクラス|DateTime]] | |
− | ;path
| |
− | :取得するフォルダのファイルパス。 | |
− | ;戻り値
| |
− | :最終アクセス日を表す[[DateTimeクラス|DateTime]]。
| |
− | | |
− | ==== SetLastAccessTimeUtc ====
| |
− | フォルダの最終アクセス日をUTC時刻で設定します。
| |
− | Static Sub SetLastAccessTimeUtc(path As [[Stringクラス|String]], lastAccessTime As [[DateTimeクラス|DateTime]])
| |
− | ;path
| |
− | :取得するフォルダのファイルパス。
| |
− | ;lastAccessTime
| |
− | :最終アクセス日を表す[[DateTimeクラス|DateTime]]。
| |
− | | |
− | ==== GetLastWriteTime ====
| |
− | フォルダの最終書き込み日を取得します。
| |
− | Static Function GetLastWriteTime(path As [[Stringクラス|String]]) As [[DateTimeクラス|DateTime]] | |
− | ;path
| |
− | :取得するフォルダのファイルパス。
| |
− | ;戻り値
| |
− | :書き込み日を表す[[DateTimeクラス|DateTime]]。
| |
− | | |
− | ==== SetLastWriteTime ====
| |
− | フォルダの最終書き込み日を設定します。
| |
− | Static Sub SetLastWriteTime(path As [[Stringクラス|String]], lastWriteTime As [[DateTimeクラス|DateTime]])
| |
− | ;path
| |
− | :設定するフォルダのファイルパス。 | |
− | ;lastWriteTime
| |
− | :書き込み日を表す[[DateTimeクラス|DateTime]]。
| |
− | | |
− | ==== GetLastWriteTimeUtc ====
| |
− | フォルダの最終アクセス日をUTC時刻で取得します。
| |
− | Static Function GetLastWriteTimeUtc(path As [[Stringクラス|String]]) As [[DateTimeクラス|DateTime]] | |
− | ;path
| |
− | :取得するフォルダのファイルパス。 | |
− | ;戻り値
| |
− | :書き込み日を表す[[DateTimeクラス|DateTime]]。
| |
− | | |
− | ==== SetLastWriteTimeUtc ====
| |
− | フォルダの最終書き込み日をUTC時刻で設定します。
| |
− | Static Sub SetLastWriteTimeUtc(path As [[Stringクラス|String]], lastWriteTime As [[DateTimeクラス|DateTime]]) | |
− | ;path
| |
− | :設定するフォルダのファイルパス。 | |
− | ;lastWriteTime
| |
− | :書き込み日を表す[[DateTimeクラス|DateTime]]。
| |
− | | |
− | ====GetDirectories====
| |
− | フォルダ内にあるフォルダを取得します。
| |
− | Static Function GetDirectories(path As [[Stringクラス|String]]) As [[Listクラス|List]]<[[Stringクラス|String]]>
| |
− | Static Function GetDirectories(path As [[Stringクラス|String]], searchPattern As [[Stringクラス|String]]) As [[Listクラス|List]]<[[Stringクラス|String]]>
| |
− | Static Function GetDirectories(path As [[Stringクラス|String]], searchPattern As [[Stringクラス|String]], searchOption As [[SearchOption列挙体|SearchOption]]) As [[Listクラス|List]]<[[Stringクラス|String]]> | |
− | ;path
| |
− | :検索するフォルダのファイルパス | |
− | ;searchPattern
| |
− | :見つかったフォルダのうち、searchPatternの文字列と一致するものが取得されます。省略した場合すべて取得します。 | |
− | ;searchOption
| |
− | :検索する範囲を[[SearchOption列挙体|SearchOption]]で指定します。省略した場合、[[SearchOption列挙体|SearchOption]].TopDirectoryOnly。
| |
− | | |
− | ;戻り値
| |
− | :見つかったフォルダのファイルパスが格納された[[Listクラス|List]]<[[Stringクラス|String]]>。
| |
− | | |
− | ====GetFiles====
| |
− | フォルダ内にあるファイルを取得します。
| |
− | Static Function GetFiles(path As [[Stringクラス|String]]) As [[Listクラス|List]]<[[Stringクラス|String]]>
| |
− | Static Function GetFiles(path As [[Stringクラス|String]], searchPattern As [[Stringクラス|String]]) As [[Listクラス|List]]<[[Stringクラス|String]]>
| |
− | Static Function GetFiles(path As [[Stringクラス|String]], searchPattern As [[Stringクラス|String]], searchOption As [[SearchOption列挙体|SearchOption]]) As [[Listクラス|List]]<[[Stringクラス|String]]> | |
− | ;path
| |
− | :検索するフォルダのファイルパス | |
− | ;searchPattern
| |
− | :見つかったファイルのうち、searchPatternの文字列と一致するものが取得されます。省略した場合すべて取得します。
| |
− | ;searchOption
| |
− | :検索する範囲を[[SearchOption列挙体|SearchOption]]で指定します。省略した場合、[[SearchOption列挙体|SearchOption]].TopDirectoryOnly。
| |
− | | |
− | ;戻り値
| |
− | :見つかったファイルのファイルパスが格納された[[Listクラス|List]]<[[Stringクラス|String]]>。
| |
− | | |
− | ==== GetFileSystemEnties ====
| |
− | フォルダ内にあるファイルやフォルダを取得します。
| |
− | Static Function GetFileSystemEnties(path As [[Stringクラス|String]]) As [[Listクラス|List]]<[[Stringクラス|String]]>
| |
− | Static Function GetFileSystemEnties(path As [[Stringクラス|String]], searchPattern As [[Stringクラス|String]]) As [[Listクラス|List]]<[[Stringクラス|String]]>
| |
− | ;path
| |
− | :検索するフォルダのファイルパス
| |
− | ;searchPattern
| |
− | :見つかったもののうち、searchPatternの文字列と一致するものが取得されます。省略した場合すべて取得します。
| |
− | | |
− | ;戻り値
| |
− | :見つかったファイルやフォルダのファイルパスが格納された[[Listクラス|List]]<[[Stringクラス|String]]>。
| |
− | | |
− | | |
− | ==== GetLogicalDrives ====
| |
− | 使用可能な論理ドライブを取得します。
| |
− | Static Function GetLogicalDrives() As [[Listクラス|List]]<[[Stringクラス|String]]> | |
− | ;戻り値
| |
− | :論理ドライブのパスが格納された[[Listクラス|List]]<[[Stringクラス|String]]>。 | |
| | | |
| == 関連項目 == | | == 関連項目 == |