Path

Overview

Helper class that performs operations on a file or directory path information.

Use case

You can use this class when you need to manipulate path information of file or folder, for example:

var FileName := "1.txt";
writeLn(System.IO.Path.GetExtension(FileName));
FileName := System.IO.Path.ChangeExtension("1.txt", "jpg");
writeLn(FileName);
writeLn(System.IO.Path.GetExtension(FileName)); 

Output:

.txt
1.jpg
.jpg

Location

 

ChangeExtension

 

class method ChangeExtension(FileName: not nullable String; NewExtension: String): not nullable String

 

static String! ChangeExtension(String! FileName, String NewExtension)

 

static func ChangeExtension(_ FileName: String, _ NewExtension: String) -> String

 

static String! ChangeExtension(String! FileName, String NewExtension)

Parameters:

  • FileName:
  • NewExtension:

Combine (not nullable String, not nullable String): not nullable String

 

class method Combine(BasePath: not nullable String; Path: not nullable String): not nullable String

 

static String! Combine(String! BasePath, String! Path)

 

static func Combine(_ BasePath: String, _ Path: String) -> String

 

static String! Combine(String! BasePath, String! Path)

Parameters:

  • BasePath:
  • Path:

Combine (not nullable String, not nullable String, not nullable String): not nullable String

 

class method Combine(BasePath: not nullable String; Path1: not nullable String; Path2: not nullable String): not nullable String

 

static String! Combine(String! BasePath, String! Path1, String! Path2)

 

static func Combine(_ BasePath: String, _ Path1: String, _ Path2: String) -> String

 

static String! Combine(String! BasePath, String! Path1, String! Path2)

Parameters:

  • BasePath:
  • Path1:
  • Path2:

DirectorySeparatorChar

 

class property DirectorySeparatorChar: Char read;

 

class Char DirectorySeparatorChar { get; }

 

static var DirectorySeparatorChar: Char { get{} }

 

class Char DirectorySeparatorChar { __get; }

GetExtension

 

class method GetExtension(FileName: not nullable String): not nullable String

 

static String! GetExtension(String! FileName)

 

static func GetExtension(_ FileName: String) -> String

 

static String! GetExtension(String! FileName)

Parameters:

  • FileName:

GetFileName

 

class method GetFileName(FileName: not nullable String): not nullable String

 

static String! GetFileName(String! FileName)

 

static func GetFileName(_ FileName: String) -> String

 

static String! GetFileName(String! FileName)

Parameters:

  • FileName:

GetFileNameWithoutExtension

 

class method GetFileNameWithoutExtension(FileName: not nullable String): not nullable String

 

static String! GetFileNameWithoutExtension(String! FileName)

 

static func GetFileNameWithoutExtension(_ FileName: String) -> String

 

static String! GetFileNameWithoutExtension(String! FileName)

Parameters:

  • FileName:

GetFullPath

 

class method GetFullPath(RelativePath: not nullable String): not nullable String

 

static String! GetFullPath(String! RelativePath)

 

static func GetFullPath(_ RelativePath: String) -> String

 

static String! GetFullPath(String! RelativePath)

Parameters:

  • RelativePath:

GetParentDirectory

 

class method GetParentDirectory(FileName: not nullable String): String

 

static String GetParentDirectory(String! FileName)

 

static func GetParentDirectory(_ FileName: String) -> String

 

static String GetParentDirectory(String! FileName)

Parameters:

  • FileName:

 

DirectorySeparatorChar

 

class property DirectorySeparatorChar: Char read;

 

class Char DirectorySeparatorChar { get; }

 

static var DirectorySeparatorChar: Char { get{} }

 

class Char DirectorySeparatorChar { __get; }

 

ChangeExtension

 

class method ChangeExtension(FileName: not nullable String; NewExtension: String): not nullable String

 

static String! ChangeExtension(String! FileName, String NewExtension)

 

static func ChangeExtension(_ FileName: String, _ NewExtension: String) -> String

 

static String! ChangeExtension(String! FileName, String NewExtension)

Parameters:

  • FileName:
  • NewExtension:

Combine (not nullable String, not nullable String): not nullable String

 

class method Combine(BasePath: not nullable String; Path: not nullable String): not nullable String

 

static String! Combine(String! BasePath, String! Path)

 

static func Combine(_ BasePath: String, _ Path: String) -> String

 

static String! Combine(String! BasePath, String! Path)

Parameters:

  • BasePath:
  • Path:

Combine (not nullable String, not nullable String, not nullable String): not nullable String

 

class method Combine(BasePath: not nullable String; Path1: not nullable String; Path2: not nullable String): not nullable String

 

static String! Combine(String! BasePath, String! Path1, String! Path2)

 

static func Combine(_ BasePath: String, _ Path1: String, _ Path2: String) -> String

 

static String! Combine(String! BasePath, String! Path1, String! Path2)

Parameters:

  • BasePath:
  • Path1:
  • Path2:

GetExtension

 

class method GetExtension(FileName: not nullable String): not nullable String

 

static String! GetExtension(String! FileName)

 

static func GetExtension(_ FileName: String) -> String

 

static String! GetExtension(String! FileName)

Parameters:

  • FileName:

GetFileName

 

class method GetFileName(FileName: not nullable String): not nullable String

 

static String! GetFileName(String! FileName)

 

static func GetFileName(_ FileName: String) -> String

 

static String! GetFileName(String! FileName)

Parameters:

  • FileName:

GetFileNameWithoutExtension

 

class method GetFileNameWithoutExtension(FileName: not nullable String): not nullable String

 

static String! GetFileNameWithoutExtension(String! FileName)

 

static func GetFileNameWithoutExtension(_ FileName: String) -> String

 

static String! GetFileNameWithoutExtension(String! FileName)

Parameters:

  • FileName:

GetFullPath

 

class method GetFullPath(RelativePath: not nullable String): not nullable String

 

static String! GetFullPath(String! RelativePath)

 

static func GetFullPath(_ RelativePath: String) -> String

 

static String! GetFullPath(String! RelativePath)

Parameters:

  • RelativePath:

GetParentDirectory

 

class method GetParentDirectory(FileName: not nullable String): String

 

static String GetParentDirectory(String! FileName)

 

static func GetParentDirectory(_ FileName: String) -> String

 

static String GetParentDirectory(String! FileName)

Parameters:

  • FileName: