Aardvark.Base


Dir

Static members

Static memberDescription
GetAbsoluteFileName(...)
Signature: (fileName:string * rootPath:string * useAbsolutePathsIfNecessary:bool) -> string
RelativeDir(absoluteDir, relativeToDir)
Signature: (absoluteDir:string * relativeToDir:string) -> string

Converts the absolute directory path into a relative one, relative to the provided relativeTo directory path. Returns null if not possible (e.g. paths are on different drives).

RelativeDir(absoluteDir, relativeToDir)
Signature: (absoluteDir:DirectoryInfo * relativeToDir:DirectoryInfo) -> string

Converts the absolute directory path into a relative one, relative to the provided relativeTo directory path. Returns null if not possible (e.g. paths are on different drives).

RelativeFile(absoluteFile, relativeTo)
Signature: (absoluteFile:FileInfo * relativeTo:DirectoryInfo) -> string

Converts the absolute file path into a relative one, relative to the provided relativeTo directory path. Returns null if not possible (e.g. paths are on different drives).

RelativeFile(absoluteFile, relativeTo)
Signature: (absoluteFile:string * relativeTo:string) -> string

Converts the absolute file path into a relative one, relative to the provided relativeTo directory path. Returns null if not possible (e.g. paths are on different drives).

TryGetRelativeDir(...)
Signature: (absoluteDir:string * relativeTo:string * useAbsolutePathsIfNecessary:bool) -> string

Returns the relative directory path if possible, if not it returns the absolute path if UseAbsolutePathsIfNecessary is set to true (default behaviour) else returns String.Empty.

TryGetRelativeFileName(...)
Signature: (absoluteFile:string * relativeTo:string * useAbsolutePathsIfNecessary:bool) -> string

Returns the relative file path if possible, if not it returns the absolute path if UseAbsolutePathsIfNecessary is set to true (default behaviour) else returns String.Empty.

Fork me on GitHub