StauffConsulting.Essentials.| C#: |
public class FileSystemPath :
object,
System.IComparable
|
| VB: |
Public Class FileSystemPath
Inherits Object
Implements System.IComparable
|
| Type Ancestry: | Object |
FileSystemPath |
constructor |
FileSystemPath |
constructor, using DefaultDirectorySeparator |
static | char |
DefaultDirectorySeparator |
Used for the creation of FileSystemPaths. Changing this variable does *NOT* affect existing FileSystemPaths. |
readonly | char |
DirectorySeparator |
The directory separator character used in this path. |
readonly | bool |
IsRelative |
Returns whether the path is relative. Always equal to ! IsAbsolute. |
readonly | string |
PathName |
The normalized path name (not necessarily rooted). Redundant "." and ".." directories have been removed. |
| bool |
ContainsWildcards |
Returns whether the path contains any wildcards. |
| bool |
IsAbsolute |
Returns whether the path is absolute. Always equal to ! IsRelative. |
| string |
ParentDirectory |
The parent directory of this file system object. If no parent directory was specified, returns null. |
| string |
TerminalExtension |
The (final) extension on the terminal name, NOT including the dot. Returns an empty string if there's no extension. |
| string |
TerminalName |
The terminal name in the path; that is, the file name (if the path denotes a file). |
| string |
TerminalNameWithoutExtension |
The terminal name, minus its (final) extension, if any. If the terminal name has multiple extensions, only the final one is removed; e.g. "a.b.c" -> "a.b". |
CompareTo |
|
Contains |
Returns whether this path contains the given sub-path. |
CreateTemporaryFile |
Creates a temporary file with (hopefully) a name that won't collide with some other file. An empty file is created. |
Equals |
|
Exists |
Queries the file system to determine whether the path denotes an existing file or directory. |
GetHashCode |
|
GetParentDirectoryName |
Returns the name of the parent directory; that is, the path minus the terminal name. |
GetParts |
Returns an array containing the parts (directories) of the path. |
GetRelativeTo |
Returns a path equivalent to this path, relative to the given path. Returns null if the paths are equal. |
IsDirectory |
Queries the file system to determine whether the path denotes an existing directory. |
IsFile |
Queries the file system to determine whether the path denotes an existing file. |
NormalizePath |
Normalizes the given path by removing "." and extraneous "..", and making directory separators consistent. Does *NOT* convert a relative path to a fully qualified path. |
op_Addition |
Concatenates two paths. The second path must be a relative path. |
op_Addition |
Concatenates two paths. The second path must be a relative path. |
op_Equality |
Tests two paths for equality. |
op_Inequality |
Tests two paths for equality. |
RemoveTerminalComponent |
|
ToString |
| C#: |
FileSystemPath (string path,
char directorySeparator)
|
| VB: |
Sub New(ByVal path As String, ByVal directorySeparator As Char)
|
Parameters
path | an absolute or relative path |
directorySeparator | the directory separator character |
| C#: |
FileSystemPath (string path)
|
| VB: |
Sub New(ByVal path As String)
|
Parameters
path | an absolute or relative path |
| C#: |
static char DefaultDirectorySeparator;
|
| VB: |
Shared DefaultDirectorySeparator As Char
|
| C#: |
readonly char DirectorySeparator;
|
| VB: |
ReadOnly DirectorySeparator As Char
|
| C#: |
readonly bool IsRelative;
|
| VB: |
ReadOnly IsRelative As Boolean
|
| C#: |
readonly string PathName;
|
| VB: |
ReadOnly PathName As String
|
| C#: |
bool ContainsWildcards
|
| VB: |
Property ContainsWildcards() As Boolean
|
Returns whether the path contains any wildcards.
| C#: |
bool IsAbsolute
|
| VB: |
Property IsAbsolute() As Boolean
|
Returns whether the path is absolute. Always equal to ! IsRelative.
| C#: |
string ParentDirectory
|
| VB: |
Property ParentDirectory() As String
|
The parent directory of this file system object. If no parent directory was specified, returns null.
| C#: |
string TerminalExtension
|
| VB: |
Property TerminalExtension() As String
|
The (final) extension on the terminal name, NOT including the dot. Returns an empty string if there's no extension.
| C#: |
string TerminalName
|
| VB: |
Property TerminalName() As String
|
The terminal name in the path; that is, the file name (if the path denotes a file).
| C#: |
string TerminalNameWithoutExtension
|
| VB: |
Property TerminalNameWithoutExtension() As String
|
The terminal name, minus its (final) extension, if any. If the terminal name has multiple extensions, only the final one is removed; e.g. "a.b.c" -> "a.b".
| C#: |
Int32 CompareTo(object obj)
|
| VB: |
Function CompareTo(ByVal obj As Object) As Int32
|
Parameters
obj |
| C#: |
Boolean Contains(StauffConsulting.Essentials.FileSystemPath that)
|
| VB: |
Function Contains(ByVal that As StauffConsulting.Essentials.FileSystemPath) As [Boolean]
|
Parameters
that |
| C#: |
static FileStream CreateTemporaryFile(string prefix,
string suffix,
string dir)
|
| VB: |
Shared Function CreateTemporaryFile(ByVal prefix As String, ByVal suffix As String, ByVal dir As String) As FileStream
|
Parameters
prefix | a prefix for the file name, or null |
suffix | a suffix for the file name (such as an extension), or null |
dir | the directory in which to create the file |
| C#: |
Boolean Equals(object obj)
|
| VB: |
Function Equals(ByVal obj As Object) As [Boolean]
|
Parameters
obj |
| C#: |
Boolean Exists()
|
| VB: |
Function Exists() As [Boolean]
|
| C#: |
Int32 GetHashCode()
|
| VB: |
Function GetHashCode() As Int32
|
| C#: |
String GetParentDirectoryName()
|
| VB: |
Function GetParentDirectoryName() As [String]
|
| C#: |
String[] GetParts()
|
| VB: |
Function GetParts() As [String]()
|
| C#: |
FileSystemPath GetRelativeTo(StauffConsulting.Essentials.FileSystemPath relativeToPath)
|
| VB: |
Function GetRelativeTo(ByVal relativeToPath As StauffConsulting.Essentials.FileSystemPath) As FileSystemPath
|
Parameters
relativeToPath |
| C#: |
Boolean IsDirectory()
|
| VB: |
Function IsDirectory() As [Boolean]
|
| C#: |
Boolean IsFile()
|
| VB: |
Function IsFile() As [Boolean]
|
| C#: |
static String NormalizePath(string path,
char dirSep)
|
| VB: |
Shared Function NormalizePath(ByVal path As String, ByVal dirSep As Char) As [String]
|
Parameters
path | |
dirSep |
| C#: |
static FileSystemPath op_Addition(StauffConsulting.Essentials.FileSystemPath path,
string str)
|
| VB: |
Shared Function op_Addition(ByVal path As StauffConsulting.Essentials.FileSystemPath, ByVal str As String) As FileSystemPath
|
Parameters
path | |
str |
| C#: |
static FileSystemPath op_Addition(StauffConsulting.Essentials.FileSystemPath p1,
StauffConsulting.Essentials.FileSystemPath p2)
|
| VB: |
Shared Function op_Addition(ByVal p1 As StauffConsulting.Essentials.FileSystemPath, ByVal p2 As StauffConsulting.Essentials.FileSystemPath) As FileSystemPath
|
Parameters
p1 | |
p2 |
| C#: |
static Boolean op_Equality(StauffConsulting.Essentials.FileSystemPath p1,
StauffConsulting.Essentials.FileSystemPath p2)
|
| VB: |
Shared Function op_Equality(ByVal p1 As StauffConsulting.Essentials.FileSystemPath, ByVal p2 As StauffConsulting.Essentials.FileSystemPath) As [Boolean]
|
Parameters
p1 | |
p2 |
| C#: |
static Boolean op_Inequality(StauffConsulting.Essentials.FileSystemPath p1,
StauffConsulting.Essentials.FileSystemPath p2)
|
| VB: |
Shared Function op_Inequality(ByVal p1 As StauffConsulting.Essentials.FileSystemPath, ByVal p2 As StauffConsulting.Essentials.FileSystemPath) As [Boolean]
|
Parameters
p1 | |
p2 |
| C#: |
static String RemoveTerminalComponent(string path,
System.String& terminalComponent)
|
| VB: |
Shared Function RemoveTerminalComponent(ByVal path As String, ByVal terminalComponent As System.String&) As [String]
|
Parameters
path | |
terminalComponent |
| C#: |
String ToString()
|
| VB: |
Function ToString() As [String]
|