System.IOUtils.TPath
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:
};
Eigenschaften
Typ | Sichtbarkeit | Quelle | Unit | Übergeordnet |
---|---|---|---|---|
record struct |
public | System.IOUtils.pas System.IOUtils.hpp |
System.IOUtils | System.IOUtils |
Beschreibung
Enthält eine große Anzahl von statischen Zusatzmethoden, die bei der Bearbeitung von Pfaden verwendet werden.
TPath ist ein Record, der nur statische Methoden zur Durchführung von Operationen mit Pfaden enthält. Deklarieren Sie keine Variablen vom Typ TPath, da TPath nicht über Instanzmethoden oder -felder verfügt. Folgende Operationen können mit TPath durchgeführt werden:
- Überprüfen der Richtigkeit eines Pfad- oder Dateinamens
- Extrahieren von Teilen eines Pfadstrings
- Erstellen von temporären und eindeutigen Pfaden
Anmerkung: Die meisten von TPath zur Verfügung gestellten Methoden sind mit den Methoden der Klasse Path im .NET Framework bezüglich der Signatur kompatibel.