FileSurfer 2.1.2
Cross-platform file manager with support for Git and SFTP
Loading...
Searching...
No Matches
FileSurfer.Core.Models.IPathTools Interface Reference

Provides methods for manipulating paths for specific filesystems. More...

Inheritance diagram for FileSurfer.Core.Models.IPathTools:

Public Member Functions

string NormalizePath (string path)
 Normalizes the given path to a path without redundant separators and without a trailing separator Separators at root level paths are kept.
string Combine (string pathBase, string pathSuffix)
 Combines two paths Returns the combined path without trailing separators.
string GetParentDir (string path)
 Returns the parent directory of the given path.
string GetFileName (string path)
 Returns the name and extension parts of the given path.
string GetExtension (string path)
 Returns extension part of the given path including the dot '.
bool NamesAreEqual (string? nameA, string? nameB)
 Determines if two file or directory names are equal under the relevant filesystem's rules.
bool PathsAreEqual (string? pathA, string? pathB)
 Determines if two file or directory paths are equal under the relevant filesystem's rules.

Properties

char DirSeparator [get]
 Platform-specific character used to separate directory levels in a path string.

Detailed Description

Provides methods for manipulating paths for specific filesystems.

Member Function Documentation

◆ Combine()

string FileSurfer.Core.Models.IPathTools.Combine ( string pathBase,
string pathSuffix )

Combines two paths Returns the combined path without trailing separators.

Implemented in FileSurfer.Core.Models.LocalPathTools, and FileSurfer.Core.Models.RemoteUnixPathTools.

Here is the caller graph for this function:

◆ GetExtension()

string FileSurfer.Core.Models.IPathTools.GetExtension ( string path)

Returns extension part of the given path including the dot '.

' Trailing separators are ignored.

Implemented in FileSurfer.Core.Models.LocalPathTools, and FileSurfer.Core.Models.RemoteUnixPathTools.

Here is the caller graph for this function:

◆ GetFileName()

string FileSurfer.Core.Models.IPathTools.GetFileName ( string path)

Returns the name and extension parts of the given path.

The resulting string contains the characters of path that follow the last separator in path. Trailing separators are ignored

Implemented in FileSurfer.Core.Models.LocalPathTools, and FileSurfer.Core.Models.RemoteUnixPathTools.

Here is the caller graph for this function:

◆ GetParentDir()

string FileSurfer.Core.Models.IPathTools.GetParentDir ( string path)

Returns the parent directory of the given path.

Trailing separators are ignored Returns string.Empty if path has no parent directory

Implemented in FileSurfer.Core.Models.LocalPathTools, and FileSurfer.Core.Models.RemoteUnixPathTools.

Here is the caller graph for this function:

◆ NamesAreEqual()

bool FileSurfer.Core.Models.IPathTools.NamesAreEqual ( string? nameA,
string? nameB )

Determines if two file or directory names are equal under the relevant filesystem's rules.

Implemented in FileSurfer.Core.Models.LocalPathTools, and FileSurfer.Core.Models.RemoteUnixPathTools.

◆ NormalizePath()

string FileSurfer.Core.Models.IPathTools.NormalizePath ( string path)

Normalizes the given path to a path without redundant separators and without a trailing separator Separators at root level paths are kept.

Parameters
pathPath to normalize
Returns
Normalized path

Implemented in FileSurfer.Core.Models.LocalPathTools, and FileSurfer.Core.Models.RemoteUnixPathTools.

◆ PathsAreEqual()

bool FileSurfer.Core.Models.IPathTools.PathsAreEqual ( string? pathA,
string? pathB )

Determines if two file or directory paths are equal under the relevant filesystem's rules.

Implemented in FileSurfer.Core.Models.LocalPathTools, and FileSurfer.Core.Models.RemoteUnixPathTools.

Property Documentation

◆ DirSeparator

char FileSurfer.Core.Models.IPathTools.DirSeparator
get

Platform-specific character used to separate directory levels in a path string.

Implemented in FileSurfer.Core.Models.LocalPathTools.


The documentation for this interface was generated from the following file:
  • /home/janecea/Documents/CODE/PROJECTS/FileSurfer/src/FileSurfer.Core/Models/IPathTools.cs