Logo Paket

Utils Module

Types and nested modules

Type/Module Description

List

ObservableExtensions

Seq

String

Task

MemoizeAsyncExResult<'TResult, 'TCached>

PackagesFolderGroupConfig

PathReference

ResolvedPackagesFolder

Functions and values

Function or value Description

x ++ y

Full Usage: x ++ y

Parameters:
    x : 'a option
    y : 'a option

Returns: 'a option
Modifiers: inline
Type parameters: 'a
x : 'a option
y : 'a option
Returns: 'a option

CleanDir path

Full Usage: CleanDir path

Parameters:
    path : string

Cleans a directory by deleting it and recreating it.

path : string

DirectoryInfo str

Full Usage: DirectoryInfo str

Parameters:
    str : string

Returns: DirectoryInfo
str : string
Returns: DirectoryInfo

FileInfo str

Full Usage: FileInfo str

Parameters:
    str : string

Returns: FileInfo
str : string
Returns: FileInfo

FindAllFiles (folder, pattern)

Full Usage: FindAllFiles (folder, pattern)

Parameters:
    folder : string
    pattern : string

Returns: FileInfo[]

Gets all files with the given pattern, skipping directories whose name starts with a dot (e.g. .git, .vs, .localhistory) since these are not expected to contain relevant project files and can be large or contain unrelated backup/history data (see issue #3250). The directories that are links are skipped too, as they may lead out of the folder.

folder : string
pattern : string
Returns: FileInfo[]

GetHomeDirectory ()

Full Usage: GetHomeDirectory ()

Parameters:
    () : unit

Returns: string
() : unit
Returns: string

ProgramFiles

Full Usage: ProgramFiles

Returns: string

The path of the "Program Files" folder - might be x64 on x64 machine

Returns: string

ProgramFilesX86

Full Usage: ProgramFilesX86

Returns: string

The path of Program Files (x86) It seems this covers all cases where PROCESSOR\_ARCHITECTURE may misreport and the case where the other variable PROCESSOR\_ARCHITEW6432 can be null

Returns: string

RunInLockedAccessMode (lockedFolder, lockedAction)

Full Usage: RunInLockedAccessMode (lockedFolder, lockedAction)

Parameters:
    lockedFolder : string
    lockedAction : unit -> bool

lockedFolder : string
lockedAction : unit -> bool

SystemRoot

Full Usage: SystemRoot

Returns: string

The system root environment variable. Typically "C:\Windows"

Returns: string

TimeSpanToReadableString span

Full Usage: TimeSpanToReadableString span

Parameters:
Returns: string
span : TimeSpan
Returns: string

acceptJson

Full Usage: acceptJson

Returns: string
Returns: string

acceptXml

Full Usage: acceptXml

Returns: string
Returns: string

askYesNo question

Full Usage: askYesNo question

Parameters:
    question : string

Returns: bool

If the guard is true then a [Y]es / [N]o question will be ask. Until the user pressed y or n.

question : string
Returns: bool

autoAnswer

Full Usage: autoAnswer

Returns: bool option
Returns: bool option

createDir path

Full Usage: createDir path

Parameters:
    path : string

Returns: Result<unit, DomainMessage>

Creates a directory if it does not exist.

path : string
Returns: Result<unit, DomainMessage>

deleteDir dirInfo

Full Usage: deleteDir dirInfo

Parameters:
dirInfo : DirectoryInfo

dirSeparator

Full Usage: dirSeparator

Returns: string
Returns: string

emptyDir dirInfo

Full Usage: emptyDir dirInfo

Parameters:
dirInfo : DirectoryInfo

endsWith text x

Full Usage: endsWith text x

Parameters:
    text : string
    x : ^a

Returns: bool
Modifiers: inline
Type parameters: ^a (requires (member EndsWith : ^a * Microsoft.FSharp.Core.string -> Microsoft.FSharp.Core.bool))
text : string
x : ^a
Returns: bool

extractZipToDirectory zipFileName directoryName

Full Usage: extractZipToDirectory zipFileName directoryName

Parameters:
    zipFileName : string
    directoryName : string

zipFileName : string
directoryName : string

fixDatesInArchive fileName

Full Usage: fixDatesInArchive fileName

Parameters:
    fileName : string

fileName : string

force lz

Full Usage: force lz

Parameters:
Returns: 'a
Modifiers: inline
Type parameters: 'a
lz : Lazy<'a>
Returns: 'a

getDirectoryInfoForLocalNuGetFeed pathInfo alternativeProjectRoot root

Full Usage: getDirectoryInfoForLocalNuGetFeed pathInfo alternativeProjectRoot root

Parameters:
    pathInfo : PathReference
    alternativeProjectRoot : string option
    root : string

Returns: DirectoryInfo
pathInfo : PathReference
alternativeProjectRoot : string option
root : string
Returns: DirectoryInfo

getFileEncoding path

Full Usage: getFileEncoding path

Parameters:
    path : string

Returns: Encoding
path : string
Returns: Encoding

getSha512File filePath

Full Usage: getSha512File filePath

Parameters:
    filePath : string

Returns: string
filePath : string
Returns: string

getSha512Stream stream

Full Usage: getSha512Stream stream

Parameters:
Returns: string
stream : Stream
Returns: string

isLink fileSystemInfo

Full Usage: isLink fileSystemInfo

Parameters:
Returns: bool

Whether the file or directory is a symbolic link or a junction, unlike the other reparse points such as a OneDrive or deduplicated file, which have no LinkTarget; a reparse point whose target cannot be read, e.g. when its access is denied, is taken for a link

fileSystemInfo : FileSystemInfo
Returns: bool

isLinux

Full Usage: isLinux

Returns: bool

Determines if the current system is a Linux system

Returns: bool

isMacOS

Full Usage: isMacOS

Returns: bool

Determines if the current system is a MacOs system

Returns: bool

isMatchingOperatingSystem operatingSystemFilter

Full Usage: isMatchingOperatingSystem operatingSystemFilter

Parameters:
    operatingSystemFilter : string option

Returns: bool
operatingSystemFilter : string option
Returns: bool

isMatchingPlatform operatingSystemFilter

Full Usage: isMatchingPlatform operatingSystemFilter

Parameters:
    operatingSystemFilter : string option

Returns: bool
operatingSystemFilter : string option
Returns: bool

isNotNull x

Full Usage: isNotNull x

Parameters:
    x : 'a

Returns: bool
Modifiers: inline
Type parameters: 'a
x : 'a
Returns: bool

isUnix

Full Usage: isUnix

Returns: bool

Determines if the current system is an Unix system

Returns: bool

isWindows

Full Usage: isWindows

Returns: bool

Determines if the current system is a Windows system

Returns: bool

normalizeHomeDirectory path

Full Usage: normalizeHomeDirectory path

Parameters:
    path : string

Returns: string
Modifiers: inline
path : string
Returns: string

normalizeLineEndings text

Full Usage: normalizeLineEndings text

Parameters:
    text : string

Returns: string
text : string
Returns: string

normalizeLocalPath path

Full Usage: normalizeLocalPath path

Parameters:
    path : string

Returns: PathReference
path : string
Returns: PathReference

normalizePath path

Full Usage: normalizePath path

Parameters:
    path : string

Returns: string
Modifiers: inline
path : string
Returns: string

notNullOrEmpty

Full Usage: notNullOrEmpty

Returns: string -> bool
Returns: string -> bool

parseKeyValuePairs s

Full Usage: parseKeyValuePairs s

Parameters:
    s : string

Returns: Dictionary<string, string>
s : string
Returns: Dictionary<string, string>

readAnswer ()

Full Usage: readAnswer ()

Parameters:
    () : unit

Returns: string
() : unit
Returns: string

removeComment text

Full Usage: removeComment text

Parameters:
    text : string

Returns: string
text : string
Returns: string

removeFile fileName

Full Usage: removeFile fileName

Parameters:
    fileName : string

Returns: Result<unit, DomainMessage>
fileName : string
Returns: Result<unit, DomainMessage>

rethrowf f inner fmt

Full Usage: rethrowf f inner fmt

Parameters:
    f : string * 'a -> 'b
    inner : 'a
    fmt : StringFormat<'c, 'd>

Returns: 'c
Type parameters: 'a, 'b, 'c, 'd (requires :> System.Exception)
f : string * 'a -> 'b
inner : 'a
fmt : StringFormat<'c, 'd>
Returns: 'c

runDotnet workingDir arguments

Full Usage: runDotnet workingDir arguments

Parameters:
    workingDir : string
    arguments : string

workingDir : string
arguments : string

saveFile fileName contents

Full Usage: saveFile fileName contents

Parameters:
    fileName : string
    contents : string

Returns: Result<unit, DomainMessage>
fileName : string
contents : string
Returns: Result<unit, DomainMessage>

saveNormalizedXml fileName doc

Full Usage: saveNormalizedXml fileName doc

Parameters:
Returns: Result<unit, DomainMessage>
fileName : string
doc : XmlDocument
Returns: Result<unit, DomainMessage>

sndOf3 (arg1, v, arg1)

Full Usage: sndOf3 (arg1, v, arg1)

Parameters:
    arg0 : 'a
    v : 'b
    arg2 : 'c

Returns: 'b
Type parameters: 'a, 'b, 'c
arg0 : 'a
v : 'b
arg2 : 'c
Returns: 'b

thirdOf3 (arg1, arg1, v)

Full Usage: thirdOf3 (arg1, arg1, v)

Parameters:
    arg0 : 'a
    arg1 : 'b
    v : 'c

Returns: 'c
Type parameters: 'a, 'b, 'c
arg0 : 'a
arg1 : 'b
v : 'c
Returns: 'c

toLower str

Full Usage: toLower str

Parameters:
    str : ^a

Returns: string
Modifiers: inline
Type parameters: ^a (requires (member ToLower : ^a -> Microsoft.FSharp.Core.string))
str : ^a
Returns: string

tryGet key this

Full Usage: tryGet key this

Parameters:
    key : ^k
    this : ^a

Returns: 'v option
Modifiers: inline
Type parameters: ^k, ^a, 'v (requires (member TryGetValue : ^a * ^k * Microsoft.FSharp.Core.byref<'v> -> Microsoft.FSharp.Core.bool))
key : ^k
this : ^a
Returns: 'v option

windowsPath path

Full Usage: windowsPath path

Parameters:
    path : string

Returns: string
Modifiers: inline
path : string
Returns: string

Type extensions

Type extension Description

this.AddLine

Full Usage: this.AddLine

Parameters:
    text : string

Extended Type: StringBuilder

text : string

this.AppendLinef

Full Usage: this.AppendLinef

Parameters:
Returns: 'a
Type parameters: 'a

Extended Type: StringBuilder

text : StringFormat<'a, StringBuilder>
Returns: 'a

Type something to start searching.