FilePath Class |
Namespace: DHI.Mike1D.Generic
The FilePath type exposes the following members.
Name | Description | |
---|---|---|
FilePath |
Creates a new FilePath without a Path set. This defaults the path
to the current directory
| |
FilePath(String) |
Creates a new FilePath with the given strfilePath as Path. If the path is
relative, then the current directory are used as BaseFilePath.
| |
FilePath(IFilePath) |
Creates a new FilePath with the given strfilePath as Path. If the path is
relative, then the current directory are used as BaseFilePath.
| |
FilePath(String, IFilePath) |
Creates a new FilePath with the given strfilePath as Path
and uses the baseFilePath as BaseFilePath
|
Name | Description | |
---|---|---|
BaseFilePath |
If the path is relative, a BaseFilePath can be set. If a
BaseFilePath is not set, then the CurrentDirectory will be used
as BaseFilePath. For absolute paths, BaseFilePath is ignored.
Only the directory part of the BaseFilePath is used.
| |
DirectoryName |
Gets the directory name of the filepath. It will return
relative or absolute directory, depending on whether the filepath
is relative or absolute.
| |
Extension |
Gets or alters the extension of the file. The extionsion
is returned with the dot, i.e., on the form ".ext".
If no extension exists, the empty string is returned.
If path is null, null is returned.
It can be set with or without the dot.
| |
FileName |
Gets/alters the filename including extension
| |
FileNameWithoutExtension |
Gets/alters the filename without the extension
| |
FullDirectoryName |
Gets the full directory name of the filepath. It will return
an absolute directory.
| |
FullFilePath |
Gets the full directory name of the filepath, including file name. It will return
an absolute directory.
| |
HasPath |
Return true if FilePath has a Path, false if empty.
| |
IsRelative |
Returns true if the FilePath is relative
| |
Path |
Get/set file name including path. The path can be absolute or relative.
| |
RelativeDirectoryName |
Gets the relative directory name of the filepath. It will return
a directory relative to BaseFilePath or CurrentDirectory.
| |
RelativeFilePath |
Gets the relative directory name of the filepath, including file name. It will return
a directory relative to BaseFilePath or CurrentDirectory.
|
Name | Description | |
---|---|---|
Clone |
Creates a deep clone of the FilePath
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
ExtensionIs |
Return true if the extension of the file path is "extension".
| |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetRelativeFilePath |
Make the filepath relative to baseDirectory. If not succeding, return original file path.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MakePathFull |
Make the Path absolute, based on either BaseFilePath or CurrentDirectory.
If path is already absolute, this has no effekt.
| |
MakePathRelative |
Make the Path relative, based on either BaseFilePath or CurrentDirectory.
If path is already relative, this has no effect.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |