C# Class Universe.Framework.Utilities.PathHelpers

ファイルを表示 Open project: Virtual-Universe/Virtual-Universe

Public Methods

Method Description
ComputeFullPath ( string Path ) : string
GetFilenames ( string defaultDir, string extension, bool showextension ) : List
GetReadFilename ( string prompt, string defaultDir, List extensions, bool showextension ) : string

Gets file for reading and verifies that it exists.

GetReadFilename ( string prompt, string defaultDir, string extension, bool showextension ) : string

Gets file for reading and verifies that it exists.

PathHomeDrive ( string fName ) : string
PathUsername ( string Path ) : string
VerifyOSPath ( string filename ) : string

Verifies and corrects the OS path.

VerifyReadFile ( string fileName, List extensions, string defaultDir ) : string

Verifies file for reading, setting some defaults if needed.

VerifyReadFile ( string fileName, string defaultExt, string defaultDir ) : string

Verifies file for reading, setting some defaults if needed.

VerifyReadFile ( string fileName, string defaultExt, string defaultDir, bool showErrors ) : string

Verifies file for reading, setting some defaults if needed.

VerifyWriteFile ( string fileName, string defaultExt, string defaultDir, bool createPath ) : string

Verifies a file for writing setting some defaults if needed.

Method Details

ComputeFullPath() public static method

public static ComputeFullPath ( string Path ) : string
Path string
return string

GetFilenames() public static method

public static GetFilenames ( string defaultDir, string extension, bool showextension ) : List
defaultDir string
extension string
showextension bool
return List

GetReadFilename() public static method

Gets file for reading and verifies that it exists.
public static GetReadFilename ( string prompt, string defaultDir, List extensions, bool showextension ) : string
prompt string Prompt.
defaultDir string Default dir.
extensions List Extensions.
showextension bool If set to true showextension.
return string

GetReadFilename() public static method

Gets file for reading and verifies that it exists.
public static GetReadFilename ( string prompt, string defaultDir, string extension, bool showextension ) : string
prompt string Prompt.
defaultDir string Defaultdir.
extension string Extension.
showextension bool
return string

PathHomeDrive() public static method

public static PathHomeDrive ( string fName ) : string
fName string
return string

PathUsername() public static method

public static PathUsername ( string Path ) : string
Path string
return string

VerifyOSPath() public static method

Verifies and corrects the OS path.
public static VerifyOSPath ( string filename ) : string
filename string Filename.
return string

VerifyReadFile() public static method

Verifies file for reading, setting some defaults if needed.
public static VerifyReadFile ( string fileName, List extensions, string defaultDir ) : string
fileName string File name.
extensions List Extensions.
defaultDir string Default dir.
return string

VerifyReadFile() public static method

Verifies file for reading, setting some defaults if needed.
public static VerifyReadFile ( string fileName, string defaultExt, string defaultDir ) : string
fileName string File name.
defaultExt string Default ext.
defaultDir string Default dir.
return string

VerifyReadFile() public static method

Verifies file for reading, setting some defaults if needed.
public static VerifyReadFile ( string fileName, string defaultExt, string defaultDir, bool showErrors ) : string
fileName string File name.
defaultExt string Default ext.
defaultDir string Default dir.
showErrors bool Show error messages.
return string

VerifyWriteFile() public static method

Verifies a file for writing setting some defaults if needed.
public static VerifyWriteFile ( string fileName, string defaultExt, string defaultDir, bool createPath ) : string
fileName string File name.
defaultExt string Default ext.
defaultDir string Default dir.
createPath bool If set to true create path.
return string