Pathfinder  v3.0
The definitive Hacknet programmable modding system
Pathfinder.GameFilesystem.FilePath Class Reference

Public Member Functions

 FilePath (string path)
 
FilePath Append (FilePath source)
 
FilePath Append (string source)
 
FilePath Concat (FilePath source)
 
FilePath Concat (string source)
 

Static Public Member Functions

static implicit operator FilePath (string s)
 
static implicit operator string (FilePath p)
 
static FilePath operator/ (FilePath path, FilePath source)
 
static FilePath operator/ (FilePath path, string source)
 
static FilePath operator+ (FilePath path, FilePath source)
 
static FilePath operator+ (FilePath path, string source)
 

Public Attributes

const string SEPERATOR = "/"
 
FilePath Root => Path.StartsWith(SEPERATOR) ? Path.Substring(1, Path.IndexOf(SEPERATOR, 1)) : ""
 
FilePath Relative => Path.IndexOf(Root) != -1 ? Path.Remove(Path.IndexOf(Root), Root.Path.Length) : Path
 
FilePath Filename
 
FilePath Stem
 
FilePath Extension
 

Properties

string Path [get, set]
 
FilePath Parent [get]
 

Constructor & Destructor Documentation

◆ FilePath()

Pathfinder.GameFilesystem.FilePath.FilePath ( string  path)

Member Function Documentation

◆ Append() [1/2]

FilePath Pathfinder.GameFilesystem.FilePath.Append ( FilePath  source)

◆ Append() [2/2]

FilePath Pathfinder.GameFilesystem.FilePath.Append ( string  source)

◆ Concat() [1/2]

FilePath Pathfinder.GameFilesystem.FilePath.Concat ( FilePath  source)

◆ Concat() [2/2]

FilePath Pathfinder.GameFilesystem.FilePath.Concat ( string  source)

◆ operator FilePath()

static implicit Pathfinder.GameFilesystem.FilePath.operator FilePath ( string  s)
static

◆ operator string()

static implicit Pathfinder.GameFilesystem.FilePath.operator string ( FilePath  p)
static

◆ operator+() [1/2]

static FilePath Pathfinder.GameFilesystem.FilePath.operator+ ( FilePath  path,
FilePath  source 
)
static

◆ operator+() [2/2]

static FilePath Pathfinder.GameFilesystem.FilePath.operator+ ( FilePath  path,
string  source 
)
static

◆ operator/() [1/2]

static FilePath Pathfinder.GameFilesystem.FilePath.operator/ ( FilePath  path,
FilePath  source 
)
static

◆ operator/() [2/2]

static FilePath Pathfinder.GameFilesystem.FilePath.operator/ ( FilePath  path,
string  source 
)
static

Member Data Documentation

◆ Extension

FilePath Pathfinder.GameFilesystem.FilePath.Extension
Initial value:
=> Filename.Path.LastIndexOf('.') != -1
&& Filename != "." && Filename != ".."
? Filename.Path.Substring(Filename.Path.LastIndexOf('.')) : ""

◆ Filename

FilePath Pathfinder.GameFilesystem.FilePath.Filename
Initial value:
=> Path.IndexOf(SEPERATOR) != Path.LastIndexOf(SEPERATOR)
&& Path.LastIndexOf(SEPERATOR) == Path.Length - 1
? "." : Path.Substring(Path.LastIndexOf(SEPERATOR)+1)

◆ Relative

FilePath Pathfinder.GameFilesystem.FilePath.Relative => Path.IndexOf(Root) != -1 ? Path.Remove(Path.IndexOf(Root), Root.Path.Length) : Path

◆ Root

FilePath Pathfinder.GameFilesystem.FilePath.Root => Path.StartsWith(SEPERATOR) ? Path.Substring(1, Path.IndexOf(SEPERATOR, 1)) : ""

◆ SEPERATOR

const string Pathfinder.GameFilesystem.FilePath.SEPERATOR = "/"

◆ Stem

FilePath Pathfinder.GameFilesystem.FilePath.Stem
Initial value:
=> Filename.Path.LastIndexOf('.') != -1
&& Filename != "." && Filename != ".."
? Filename.Path.Remove(Filename.Path.LastIndexOf('.')) : Filename.Path

Property Documentation

◆ Parent

FilePath Pathfinder.GameFilesystem.FilePath.Parent
get

◆ Path

string Pathfinder.GameFilesystem.FilePath.Path
getset

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