FAKE - F# Make - A DSL for build tasks and more FAKE
6.1.3

Lookig for older versions of the documentation, pre FAKE v6? See 

v5.fake.build

Path Module

Contains helper function which allow to deal with files and directories.

Functions and values

Function or value Description

Path.changeExtension extension fileName

Full Usage: Path.changeExtension extension fileName

Parameters:
    extension : string - The new extension containing the leading '.'.
    fileName : string - Name of the file from which the extension is retrieved.

Returns: string

Change the extension of the file.

extension : string

The new extension containing the leading '.'.

fileName : string

Name of the file from which the extension is retrieved.

Returns: string

Path.combine path1 path2

Full Usage: Path.combine path1 path2

Parameters:
    path1 : string - The first path to combine
    path2 : string - The second path to combine

Returns: string
Modifiers: inline

Combines two path strings using Path.Combine

path1 : string

The first path to combine

path2 : string

The second path to combine

Returns: string

Path.combineTrimEnd path1 path2

Full Usage: Path.combineTrimEnd path1 path2

Parameters:
    path1 : string - The first path to combine
    path2 : string - The second path to combine

Returns: string
Modifiers: inline

Combines two path strings using Path.Combine. Trims leading slashes of path2. This makes combineTrimEnd "/test" "/sub" return /test/sub

path1 : string

The first path to combine

path2 : string

The second path to combine

Returns: string

Path.convertWindowsToCurrentPath windowsPath

Full Usage: Path.convertWindowsToCurrentPath windowsPath

Parameters:
    windowsPath : string - The path to operate on

Returns: string

Convert the given windows path to a path in the current system

windowsPath : string

The path to operate on

Returns: string

Path.directorySeparator

Full Usage: Path.directorySeparator

Returns: string

The directory separator string. On most systems / or \

Returns: string

Path.getDirectory path

Full Usage: Path.getDirectory path

Parameters:
    path : string - The path from which the directory is retrieved.

Returns: string

Get the directory of the specified path

path : string

The path from which the directory is retrieved.

Returns: string

Path.getFullName p

Full Usage: Path.getFullName p

Parameters:
    p : string - The path to get its absolute path

Returns: string

Gets the absolute path for the given path

p : string

The path to get its absolute path

Returns: string

Path.hasExtension extension fileName

Full Usage: Path.hasExtension extension fileName

Parameters:
    extension : string - The extension to fine containing the leading '.'.
    fileName : string - Name of the file from which the extension is retrieved.

Returns: bool

Tests whether the file has specified extensions (containing the leading '.')

extension : string

The extension to fine containing the leading '.'.

fileName : string

Name of the file from which the extension is retrieved.

Returns: bool

Path.isDirectory path

Full Usage: Path.isDirectory path

Parameters:
    path : string - The path to check

Returns: bool

Detects whether the given path is a directory.

path : string

The path to check

Returns: bool

Path.isFile path

Full Usage: Path.isFile path

Parameters:
    path : string - The path to check

Returns: bool

Detects whether the given path is a file.

path : string

The path to check

Returns: bool

Path.isValidPath path

Full Usage: Path.isValidPath path

Parameters:
    path : string

Returns: bool

Detects whether the given path does not contains invalid characters.

path : string
Returns: bool

Path.normalizeFileName fileName

Full Usage: Path.normalizeFileName fileName

Parameters:
    fileName : string - The file name to normalize

Returns: string

Normalizes a filename.

fileName : string

The file name to normalize

Returns: string

Path.shortenCurrentDirectory path

Full Usage: Path.shortenCurrentDirectory path

Parameters:
    path : string - The path to operate on

Returns: string
Modifiers: inline

Replaces any occurence of the currentDirectory with "."

path : string

The path to operate on

Returns: string

Path.toRelativeFrom

Full Usage: Path.toRelativeFrom

Returns: string -> string -> string

Replaces the absolute path with a relative path

Returns: string -> string -> string

Path.toRelativeFromCurrent path

Full Usage: Path.toRelativeFromCurrent path

Parameters:
    path : string - The path to operate on

Returns: string

Replaces the absolute path with a relative path

path : string

The path to operate on

Returns: string