Joutsen v0.5.0+12-g5dd5f7e
Public Member Functions | Properties | List of all members
Joutsen.IO.FilesystemPath Interface Reference

An interface representing a path leading to elements of a filesystem. More...

Public Member Functions

void Create ()
 Creates the entire path by creating all the folders belonging to it. More...
 
FilesystemPath Extend (string additionalPath)
 Extends the current path by an additional folder, file or path represented by a string. More...
 
FilesystemPath Extend (FilesystemPath additionalPath)
 Extends the current path by an additional path. More...
 
File GetAsFile ()
 Fetches the file located at this path. More...
 
Folder GetAsFolder ()
 Fetches the folder located at this path. More...
 

Properties

bool Exists [get]
 Checks if the path exists on the filesystem. More...
 
bool IsFolder [get]
 Checks if the path leads to a folder in the filesystem. More...
 
bool IsFile [get]
 Checks if the path leads to a file in the filesystem. More...
 
FilesystemPath Root [get]
 Returns the root of the path. More...
 
FilesystemPath ParentPath [get]
 Returns the path representing the parent of the current path. More...
 
string AbsolutePath [get]
 Fetches the absolute path represented by this path. More...
 
string[] Components [get]
 Returns the components (the folders that make up this path) of the path as a list. More...
 

Detailed Description

An interface representing a path leading to elements of a filesystem.

Since
0.4.0

Member Function Documentation

◆ Create()

void Joutsen.IO.FilesystemPath.Create ( )

Creates the entire path by creating all the folders belonging to it.

Remarks
This method creates only folders and should therefore not be used with file paths.

Implemented in Joutsen.IO.LocalFilesystemPath.

◆ Extend() [1/2]

FilesystemPath Joutsen.IO.FilesystemPath.Extend ( FilesystemPath  additionalPath)

Extends the current path by an additional path.

Parameters
additionalPaththe path to add
Returns
a new path representing the combined paths

◆ Extend() [2/2]

FilesystemPath Joutsen.IO.FilesystemPath.Extend ( string  additionalPath)

Extends the current path by an additional folder, file or path represented by a string.

Parameters
additionalPaththe path to add
Returns
a new path representing the combined paths

Implemented in Joutsen.IO.LocalFilesystemPath.

◆ GetAsFile()

File Joutsen.IO.FilesystemPath.GetAsFile ( )

Fetches the file located at this path.

Returns
the File instance representing the file in the filesystem or null if the path leads to a folder

Implemented in Joutsen.IO.LocalFilesystemPath.

◆ GetAsFolder()

Folder Joutsen.IO.FilesystemPath.GetAsFolder ( )

Fetches the folder located at this path.

Returns
the Folder instance representing the folder in the filesystem or null if the path leads to a file

Implemented in Joutsen.IO.LocalFilesystemPath.

Property Documentation

◆ AbsolutePath

string Joutsen.IO.FilesystemPath.AbsolutePath
get

Fetches the absolute path represented by this path.

Implemented in Joutsen.IO.LocalFilesystemPath.

◆ Components

string [] Joutsen.IO.FilesystemPath.Components
get

Returns the components (the folders that make up this path) of the path as a list.

Implemented in Joutsen.IO.LocalFilesystemPath.

◆ Exists

bool Joutsen.IO.FilesystemPath.Exists
get

Checks if the path exists on the filesystem.

Implemented in Joutsen.IO.LocalFilesystemPath.

◆ IsFile

bool Joutsen.IO.FilesystemPath.IsFile
get

Checks if the path leads to a file in the filesystem.

Implemented in Joutsen.IO.LocalFilesystemPath.

◆ IsFolder

bool Joutsen.IO.FilesystemPath.IsFolder
get

Checks if the path leads to a folder in the filesystem.

Implemented in Joutsen.IO.LocalFilesystemPath.

◆ ParentPath

FilesystemPath Joutsen.IO.FilesystemPath.ParentPath
get

Returns the path representing the parent of the current path.

Implemented in Joutsen.IO.LocalFilesystemPath.

◆ Root

FilesystemPath Joutsen.IO.FilesystemPath.Root
get

Returns the root of the path.

Implemented in Joutsen.IO.LocalFilesystemPath.