Path クラス (System.IO 名前空間)
public static class Path
継承:Object → Path
- ファイルまたはディレクトリのパス情報を格納します。
目次
メソッド
GetDirectoryName
public static string? GetDirectoryName (string? path);
public static ReadOnlySpan<char> GetDirectoryName (ReadOnlySpan<char> path);
- 文字範囲で表された、指定されたパスのディレクトリ情報を返します。
GetFileName
public static string? GetFileName (string? path);
public static ReadOnlySpan<char> GetFileName (ReadOnlySpan<char> path);
- 指定したパス文字列のファイル名と拡張子を返します。
GetRandomFileName
public static string GetRandomFileName ();
- ランダムなファイル名を返します。
- 取得されるファイル名は以下のような合計12文字の文字列です:「(8文字のランダムな英数字).(3文字のランダムな英数字)」