System.IOUtils.TPath

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

TPath = record

C++

struct DECLSPEC_DRECORD TPath
{
private:
    static System::UnicodeString FCCurrentDir;
    static System::UnicodeString FCParentDir;
    static System::UnicodeString FCExtendedPrefix;
    static System::UnicodeString FCExtendedUNCPrefix;
    static System::WideChar FAltDirectorySeparatorChar;
    static System::WideChar FDirectorySeparatorChar;
    static System::WideChar FPathSeparator;
    static System::WideChar FVolumeSeparatorChar;
    static System::WideChar FExtensionSeparatorChar;
    static System::Sysutils::TCharArray FInvalidPathChars;
    static System::Sysutils::TCharArray FInvalidFileNameChars;
    static System::Sysutils::TCharArray FFileNameWildCardChars;
    static void __fastcall CheckPathLength(const System::UnicodeString Path, const int MaxLength);
    static int __fastcall GetExtensionSeparatorPos(const System::UnicodeString FileName);
    static bool __fastcall HasPathValidColon(const System::UnicodeString Path);
    static void __fastcall InternalCheckPathParam(const System::UnicodeString Path, const bool ExistsCheck);
    static bool __fastcall IsCharInOrderedArray(const System::WideChar AChar, const System::Sysutils::TCharArray AnArray);
    static bool __fastcall IsPathSeparator(const System::WideChar AChar);
    static bool __fastcall IsFileNameWildcardChar(const System::WideChar AChar);
    static int __fastcall GetPosAfterExtendedPrefix(const System::UnicodeString Path)/* overload */;
    static int __fastcall GetPosAfterExtendedPrefix(const System::UnicodeString Path, /* out */ TPathPrefixType &Prefix)/* overload */;
    static bool __fastcall PrefixExtendsPath(const TPathPrefixType Prefix);
    static System::UnicodeString __fastcall DoCombine(const System::UnicodeString Path1, const System::UnicodeString Path2, const bool ValidateParams);
    static System::UnicodeString __fastcall DoGetDirectoryName(System::UnicodeString FileName);
    static System::UnicodeString __fastcall DoGetFileName(const System::UnicodeString FileName, const bool ValidateParam);
    static System::UnicodeString __fastcall DoGetFullPath(const System::UnicodeString Path);
    static System::UnicodeString __fastcall DoGetPathRoot(const System::UnicodeString Path);
    static bool __fastcall DoIsPathRooted(const System::UnicodeString Path, const bool ValidateParam, const bool UseWildcards);
    static bool __fastcall DoMatchesPattern(const System::UnicodeString FileName, const System::UnicodeString Pattern);
private:
public:
    static bool __fastcall IsValidPathChar(const System::WideChar AChar);
    static bool __fastcall IsValidFileNameChar(const System::WideChar AChar);
    static bool __fastcall HasValidPathChars(const System::UnicodeString Path, const bool UseWildcards);
    static bool __fastcall HasValidFileNameChars(const System::UnicodeString FileName, const bool UseWildcards);
    static TPathPrefixType __fastcall GetExtendedPrefix(const System::UnicodeString Path);
    static bool __fastcall IsDriveRooted(const System::UnicodeString Path);
    static bool __fastcall IsExtendedPrefixed(const System::UnicodeString Path);
    static bool __fastcall IsRelativePath(const System::UnicodeString Path);
    static bool __fastcall IsUNCPath(const System::UnicodeString Path);
    static bool __fastcall IsUNCRooted(const System::UnicodeString Path);
    static System::UnicodeString __fastcall GetGUIDFileName(const bool UseSeparator = false);
    static bool __fastcall DriveExists(const System::UnicodeString Path);
    static bool __fastcall MatchesPattern(const System::UnicodeString FileName, const System::UnicodeString Pattern, const bool CaseSensitive);
    static System::UnicodeString __fastcall ChangeExtension(const System::UnicodeString Path, const System::UnicodeString Extension);
    static System::UnicodeString __fastcall Combine(const System::UnicodeString Path1, const System::UnicodeString Path2, const bool ValidateParams = true)/* overload */;
    static System::UnicodeString __fastcall Combine(const System::UnicodeString Path1, const System::UnicodeString Path2, const System::UnicodeString Path3, const bool ValidateParams = true)/* overload */;
    static System::UnicodeString __fastcall Combine(const System::UnicodeString Path1, const System::UnicodeString Path2, const System::UnicodeString Path3, const System::UnicodeString Path4, const bool ValidateParams = true)/* overload */;
    static System::UnicodeString __fastcall Combine(const System::UnicodeString *Paths, const System::NativeInt Paths_High, const bool ValidateParams = true)/* overload */;
    static System::UnicodeString __fastcall GetDirectoryName(System::UnicodeString FileName);
    static System::UnicodeString __fastcall GetExtension(const System::UnicodeString FileName);
    static System::UnicodeString __fastcall GetFileName(const System::UnicodeString FileName);
    static System::UnicodeString __fastcall GetFileNameWithoutExtension(const System::UnicodeString FileName);
    static System::UnicodeString __fastcall GetFullPath(const System::UnicodeString Path);
    static System::Sysutils::TCharArray __fastcall GetInvalidFileNameChars();
    static System::Sysutils::TCharArray __fastcall GetInvalidPathChars();
    static System::UnicodeString __fastcall GetPathRoot(const System::UnicodeString Path);
    static System::UnicodeString __fastcall GetRandomFileName();
    static System::UnicodeString __fastcall GetTempFileName();
    static System::UnicodeString __fastcall GetTempPath();
    static System::UnicodeString __fastcall GetHomePath();
    static System::UnicodeString __fastcall GetDocumentsPath();
    static System::UnicodeString __fastcall GetSharedDocumentsPath();
    static System::UnicodeString __fastcall GetLibraryPath();
    static System::UnicodeString __fastcall GetCachePath();
    static System::UnicodeString __fastcall GetPublicPath();
    static System::UnicodeString __fastcall GetDesktopPath();
    static System::UnicodeString __fastcall GetAppPath();
    static System::UnicodeString __fastcall GetPicturesPath();
    static System::UnicodeString __fastcall GetSharedPicturesPath();
    static System::UnicodeString __fastcall GetCameraPath();
    static System::UnicodeString __fastcall GetSharedCameraPath();
    static System::UnicodeString __fastcall GetMusicPath();
    static System::UnicodeString __fastcall GetSharedMusicPath();
    static System::UnicodeString __fastcall GetMoviesPath();
    static System::UnicodeString __fastcall GetSharedMoviesPath();
    static System::UnicodeString __fastcall GetAlarmsPath();
    static System::UnicodeString __fastcall GetSharedAlarmsPath();
    static System::UnicodeString __fastcall GetDownloadsPath();
    static System::UnicodeString __fastcall GetSharedDownloadsPath();
    static System::UnicodeString __fastcall GetRingtonesPath();
    static System::UnicodeString __fastcall GetSharedRingtonesPath();
    static TFileAttributes __fastcall GetAttributes(const System::UnicodeString Path, bool FollowLink = true);
    static void __fastcall SetAttributes(const System::UnicodeString Path, const TFileAttributes Attributes);
    static bool __fastcall HasExtension(const System::UnicodeString Path);
    static bool __fastcall IsPathRooted(const System::UnicodeString Path);
    /* static */ __property System::WideChar ExtensionSeparatorChar = {read=FExtensionSeparatorChar};
    /* static */ __property System::WideChar AltDirectorySeparatorChar = {read=FAltDirectorySeparatorChar};
    /* static */ __property System::WideChar DirectorySeparatorChar = {read=FDirectorySeparatorChar};
    /* static */ __property System::WideChar PathSeparator = {read=FPathSeparator};
    /* static */ __property System::WideChar VolumeSeparatorChar = {read=FVolumeSeparatorChar};
private:
};

プロパティ

種類 可視性 ソース ユニット
record
struct
public
System.IOUtils.pas
System.IOUtils.hpp
System.IOUtils System.IOUtils

説明

パス操作で使用される多数の静的ユーティリティ メソッドが含まれています。

TPath は、パスに対するさまざまな操作の実行に使用される静的メソッドのみ含まれているレコードです。TPath にはインスタンス メソッドやインスタンス フィールドがないため、TPath 型の変数を宣言しないでください。TPath を使って実行できる操作は以下のとおりです。

  • パスまたはファイル名が正しいかどうかの確認
  • パス文字列のさまざまな部分の抽出
  • 一時的かつ一意なパスの生成

メモ:  TPath で公開されているメソッドの大半は、.NET FrameworkPath クラスで公開されているメソッドとシグニチャの互換性があります。

関連項目