C# Класс DSShared.PathInfo

Class to help pass around file paths
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
EnsureDirectoryExists ( ) : void

Calling this will create the directory if it does not exist

Exists ( ) : bool

First checks if the directory exists, than checks if file exists

PathInfo ( string fullPath ) : System

Initializes a new instance of the T:PathInfo class.

PathInfo ( string fullPath, bool parseFile ) : System

Initializes a new instance of the T:PathInfo class.

PathInfo ( string path, string file, string ext ) : System

Initializes a new instance of the T:PathInfo class.

ToString ( ) : string

Returns a that represents the current .

ToStringExt ( string newExt ) : string

String representation of this path, with the supplied extension added on instead of the one this object was constructed with

Описание методов

EnsureDirectoryExists() публичный Метод

Calling this will create the directory if it does not exist
public EnsureDirectoryExists ( ) : void
Результат void

Exists() публичный Метод

First checks if the directory exists, than checks if file exists
public Exists ( ) : bool
Результат bool

PathInfo() публичный Метод

Initializes a new instance of the T:PathInfo class.
public PathInfo ( string fullPath ) : System
fullPath string The full path.
Результат System

PathInfo() публичный Метод

Initializes a new instance of the T:PathInfo class.
public PathInfo ( string fullPath, bool parseFile ) : System
fullPath string The full path.
parseFile bool if set to true the path will be broken down into filename and extension parts. You should pass false if the path string does not describe a file location
Результат System

PathInfo() публичный Метод

Initializes a new instance of the T:PathInfo class.
public PathInfo ( string path, string file, string ext ) : System
path string The path.
file string The file.
ext string The ext.
Результат System

ToString() публичный Метод

Returns a that represents the current .
public ToString ( ) : string
Результат string

ToStringExt() публичный Метод

String representation of this path, with the supplied extension added on instead of the one this object was constructed with
public ToStringExt ( string newExt ) : string
newExt string The extension that will replace the one in Ext
Результат string