System.IOUtils.TPath.Combine
Delphi
class function Combine(const Path1, Path2: string; const ValidateParams: Boolean = True): string; overload; inline; static;
class function Combine(const Path1, Path2, Path3: string; const ValidateParams: Boolean = True): string; overload; static;
class function Combine(const Path1, Path2, Path3, Path4: string; const ValidateParams: Boolean = True): string; overload; static;
class function Combine(const Paths: array of string; const ValidateParams: Boolean = True): string; overload; static;
C++
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 */;
Eigenschaften
Typ | Sichtbarkeit | Quelle | Unit | Übergeordnet |
---|---|---|---|---|
function | public | System.IOUtils.pas System.IOUtils.hpp |
System.IOUtils | TPath |
Beschreibung
Kombiniert zwei Pfad-Strings.
Mit einem Aufruf von Combine können Sie aus zwei Pfaden einen neuen kombinierten Pfad erstellen. Wenn der zweite Pfad ein absoluter Pfad ist, gibt Combine diesen zurück. Andernfalls verkettet Combine den ersten mit dem zweiten Pfad und gibt den kombinierten Pfad zurück. Die folgende Tabelle enthält die von dieser Methode erwarteten Parameter.
Name | Bedeutung |
---|---|
Path1 |
Der erste Pfad. Path1 wird als Stamm für Path2 verwendet. |
Path2 |
Der Pfad, der mit Path1 verkettet wird. |
Anmerkung: Combine löst eine Exception aus, wenn die angegebenen Pfade ungültige Zeichen enthalten.