Enfusion Script API
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
FilePath Interface Reference

Static Public Member Functions

static proto bool IsDelimiter (string c)
 Checks if given char is valid path delimiter.
 
static proto bool IsSystemDelimiter (string c)
 Checks if given char is valid system path delimiter.
 
static proto string ToSystemDelimiter (string c)
 Converts given delimiter to system delimiter.
 
static proto string StripExtension (string path, out string ext="")
 Removes extension from given path.
 
static proto string Concat (string firstPart, string secondPart)
 Concatenates two strings two parts of path together.
 
static proto string StripFileName (string path)
 Removes filename from given path.
 
static proto string StripPath (string path)
 Extracts a file name from given path.
 
static proto string ToSystemFormat (string path)
 Converts given path to system compatible format.
 
static proto string ToInternalFormat (string path)
 Converts path to internal compatible format.
 
static proto string ReplaceExtension (string path, string extension)
 Replaces an extension in given path.
 
static proto string AppendExtension (string path, string extension)
 Appends an extension to the path.
 
static proto bool IsAbsolutePath (string path)
 Checks whether a path is absolute or not.
 
static proto bool MatchesPattern (string path, string pattern)
 Checks wheter a path matches a pattern.
 
static proto string FileSystemNameFromFileName (string path)
 Gets FileSystemName part of given path.
 

Member Function Documentation

◆ AppendExtension()

static proto string FilePath.AppendExtension ( string  path,
string  extension 
)
static

Appends an extension to the path.

Parameters
pathPath to append the extension to
extensionThe extension to append
Returns
Path with the extension appended

◆ Concat()

static proto string FilePath.Concat ( string  firstPart,
string  secondPart 
)
static

Concatenates two strings two parts of path together.

Parameters
firstPartFirst part of path to concantenate
secondPartSecond part of path to concantenate
Returns
A path given by concatenating firstPart and secondPart

◆ FileSystemNameFromFileName()

static proto string FilePath.FileSystemNameFromFileName ( string  path)
static

Gets FileSystemName part of given path.

For example, $mypath:File would return mypath.

Parameters
pathFull path to file
Returns
Resulting File system name

◆ IsAbsolutePath()

static proto bool FilePath.IsAbsolutePath ( string  path)
static

Checks whether a path is absolute or not.

Parameters
pathPath to check
Returns
true if path is absolute, false otherwise

◆ IsDelimiter()

static proto bool FilePath.IsDelimiter ( string  c)
static

Checks if given char is valid path delimiter.

Parameters
cSingle char string to check
Returns
true if c is path delimiter, false otherwise

◆ IsSystemDelimiter()

static proto bool FilePath.IsSystemDelimiter ( string  c)
static

Checks if given char is valid system path delimiter.

Parameters
cSingle char string to check
Returns
true if c is system path delimiter, false otherwise

◆ MatchesPattern()

static proto bool FilePath.MatchesPattern ( string  path,
string  pattern 
)
static

Checks wheter a path matches a pattern.

Parameters
pathPath to be tested
patternStandard wildcards are supported (?,*)
Returns
true if the path matches the pattern, false otherwise

◆ ReplaceExtension()

static proto string FilePath.ReplaceExtension ( string  path,
string  extension 
)
static

Replaces an extension in given path.

Parameters
pathPath to replace the extension in
extensionNew extension to place to path
Returns
Path with the extension replaced

◆ StripExtension()

static proto string FilePath.StripExtension ( string  path,
out string  ext = "" 
)
static

Removes extension from given path.

Parameters
pathPath to remove extension from
[out]extExtension which was removed
Returns
path without an extension

◆ StripFileName()

static proto string FilePath.StripFileName ( string  path)
static

Removes filename from given path.

Parameters
pathPath to remove the file name from
Returns
Path without a file name

◆ StripPath()

static proto string FilePath.StripPath ( string  path)
static

Extracts a file name from given path.

Parameters
pathPath to extract the file name from
Returns
File name extracted from given path

◆ ToInternalFormat()

static proto string FilePath.ToInternalFormat ( string  path)
static

Converts path to internal compatible format.

Parameters
pathPath to be converted
Returns
Converted path

◆ ToSystemDelimiter()

static proto string FilePath.ToSystemDelimiter ( string  c)
static

Converts given delimiter to system delimiter.

Parameters
cSingle char string to convert
Returns
System delimiter if IsDelimiter(c), c otherwise

◆ ToSystemFormat()

static proto string FilePath.ToSystemFormat ( string  path)
static

Converts given path to system compatible format.

Parameters
pathPath to be converted
Returns
Converted path

The documentation for this interface was generated from the following file: