System.IOUtils.TPath

TPath=recordprivateconstFCCurrentDir:string='.';// DO NOT LOCALIZEFCParentDir:string='..';// DO NOT LOCALIZEFCExtendedPrefix:string='\\?\';// DO NOT LOCALIZEFCExtendedUNCPrefix:string='\\?\UNC\';// DO NOT LOCALIZEclassvarFAltDirectorySeparatorChar:Char;FDirectorySeparatorChar:Char;FPathSeparator:Char;FVolumeSeparatorChar:Char;FExtensionSeparatorChar:Char;FInvalidPathChars:TCharArray;FInvalidFileNameChars:TCharArray;FPathWildcardChars:TCharArray;FFileNameWildCardChars:TCharArray;classprocedureCheckPathLength(constPath:string;constMaxLength:Integer);static;classfunctionGetExtensionSeparatorPos(constFileName:string):Integer;static;{$IFDEF MSWINDOWS}classfunctionHasPathValidColon(constPath:string):Boolean;static;{$ENDIF MSWINDOWS}classfunctionIsCharInOrderedArray(constAChar:Char;constAnArray:TCharArray):Boolean;static;classfunctionIsPathWildcardChar(constAChar:Char):Boolean;inline;static;classfunctionIsPathSeparator(constAChar:Char):Boolean;inline;static;classfunctionIsFileNameWildcardChar(constAChar:Char):Boolean;inline;static;{$IFDEF MSWINDOWS}classfunctionGetPosAfterExtendedPrefix(constPath:string):Integer;overload;inline;static;classfunctionGetPosAfterExtendedPrefix(constPath:string;outPrefix:TPathPrefixType):Integer;overload;static;classfunctionPrefixExtendsPath(constPrefix:TPathPrefixType):Boolean;inline;static;{$ENDIF MSWINDOWS}classfunctionDoCombine(constPath1,Path2:string;constValidateParams:Boolean):string;static;classfunctionDoGetDirectoryName(FileName:string):string;static;classfunctionDoGetFileName(constFileName:string;constValidateParam:Boolean):string;static;classfunctionDoGetFullPath(constPath:string):string;static;classfunctionDoGetPathRoot(constPath:string):string;static;classfunctionDoIsPathRooted(constPath:string;constValidateParam:Boolean):Boolean;static;classfunctionDoMatchesPattern(constFileName,Pattern:string):Boolean;inline;static;{$IFDEF MACOS}classfunctionInternalGetMACOSPath(constSearchedPath:NSSearchPathDirectory;constSearchMask:NSSearchPathDomainMask):string;static;{$ENDIF MACOS}publicclassconstructorCreate;classfunctionIsValidPathChar(constAChar:Char):Boolean;inline;static;classfunctionIsValidFileNameChar(constAChar:Char):Boolean;inline;static;classfunctionHasValidPathChars(constPath:string;constUseWildcards:Boolean):Boolean;static;classfunctionHasValidFileNameChars(constFileName:string;constUseWildcards:Boolean):Boolean;static;classfunctionGetExtendedPrefix(constPath:string):TPathPrefixType;static;classfunctionIsDriveRooted(constPath:string):Boolean;static;classfunctionIsExtendedPrefixed(constPath:string):Boolean;inline;static;classfunctionIsRelativePath(constPath:string):Boolean;static;classfunctionIsUNCPath(constPath:string):Boolean;inline;static;classfunctionIsUNCRooted(constPath:string):Boolean;static;classfunctionGetGUIDFileName(constUseSeparator:Boolean=False):string;static;classfunctionDriveExists(constPath:string):Boolean;static;classfunctionMatchesPattern(constFileName,Pattern:string;constCaseSensitive:Boolean):Boolean;static;classfunctionChangeExtension(constPath,Extension:string):string;static;classfunctionCombine(constPath1,Path2:string):string;inline;static;classfunctionGetDirectoryName(FileName:string):string;static;classfunctionGetExtension(constFileName:string):string;static;classfunctionGetFileName(constFileName:string):string;inline;static;classfunctionGetFileNameWithoutExtension(constFileName:string):string;static;classfunctionGetFullPath(constPath:string):string;static;classfunctionGetInvalidFileNameChars:TCharArray;inline;static;classfunctionGetInvalidPathChars:TCharArray;inline;static;classfunctionGetPathRoot(constPath:string):string;static;classfunctionGetRandomFileName:string;static;classfunctionGetTempFileName:string;static;classfunctionGetTempPath:string;static;classfunctionGetHomePath:string;static;classfunctionGetDocumentsPath:string;static;classfunctionGetSharedDocumentsPath:string;static;classfunctionGetLibraryPath:string;static;classfunctionGetCachePath:string;static;classfunctionGetPublicPath:string;static;classfunctionGetPicturesPath:string;static;classfunctionGetSharedPicturesPath:string;static;classfunctionGetCameraPath:string;static;classfunctionGetSharedCameraPath:string;static;classfunctionGetMusicPath:string;static;classfunctionGetSharedMusicPath:string;static;classfunctionGetMoviesPath:string;static;classfunctionGetSharedMoviesPath:string;static;classfunctionGetAlarmsPath:string;static;classfunctionGetSharedAlarmsPath:string;static;classfunctionGetDownloadsPath:string;static;classfunctionGetSharedDownloadsPath:string;static;classfunctionGetRingtonesPath:string;static;classfunctionGetSharedRingtonesPath:string;static;classfunctionGetAttributes(constPath:string;FollowLink:Boolean=True):TFileAttributes;inline;static;classprocedureSetAttributes(constPath:string;constAttributes:TFileAttributes);inline;static;classfunctionHasExtension(constPath:string):Boolean;static;classfunctionIsPathRooted(constPath:string):Boolean;inline;static;classpropertyExtensionSeparatorChar:CharreadFExtensionSeparatorChar;classpropertyAltDirectorySeparatorChar:CharreadFAltDirectorySeparatorChar;classpropertyDirectorySeparatorChar:CharreadFDirectorySeparatorChar;classpropertyPathSeparator:CharreadFPathSeparator;classpropertyVolumeSeparatorChar:CharreadFVolumeSeparatorChar;end;

Properties

Description

Contains a large number of static utility methods used in path manipulations.

TPath is a record containing only static methods used to perform various operations on paths. Do not declare variables of type TPath, since TPath has no instance methods or fields. Operations that can be completed using TPath include:

Verifying the correctness of a path or a file name

Extracting various parts of a path string

Generating temporary and unique paths

Note: Most of the methods exposed by TPath are signature-compatible with the ones exposed by the Path class in the .NET Framework.