Paket


Utils

Namespace: Paket

Contains methods for IO.

Nested types and modules

TypeDescription
Auth
CustomTimeoutWebClient
MemoizeAsyncExResult<'TResult, 'TCached>
PathReference
RequestFailedException

Exception for request errors

RequestFailedInfo
SafeWebResult<'a>
ModuleDescription
List
ObservableExtensions
Seq
String
Task

Functions and values

Function or valueDescription
( ++ ) x y
Signature: x:'a option -> y:'a option -> 'a option
Type parameters: 'a

CompiledName: op_PlusPlus

acceptJson
Signature: string
acceptXml
Signature: string
askYesNo question
Signature: question:string -> bool

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

autoAnswer
Signature: bool option
calcEnvProxies
Signature: Lazy<Map<string,WebProxy>>
CleanDir path
Signature: path:string -> unit

Cleans a directory by deleting it and recreating it.

createDir path
Signature: path:string -> Result<unit,DomainMessage>

Creates a directory if it does not exist.

createHttpClient (url, auth)
Signature: (url:string * auth:Auth option) -> HttpClient
createWebClient (url, auth)
Signature: (url:string * auth:Auth option) -> CustomTimeoutWebClient
deleteDir dirInfo
Signature: dirInfo:DirectoryInfo -> unit
dirSeparator
Signature: string
downloadFileSync url fileName client
Signature: url:string -> fileName:string -> client:HttpClient -> Result<unit,DomainMessage>
downloadStringSync url client
Signature: url:string -> client:HttpClient -> Result<string,DomainMessage>
emptyDir dirInfo
Signature: dirInfo:DirectoryInfo -> unit
endsWith text x
Signature: text:string -> x:^a -> bool
Type parameters: ^a
envProxies ()
Signature: unit -> Map<string,WebProxy>
failIfNoSuccess resp
Signature: resp:HttpResponseMessage -> Async<unit>
FindAllFiles (folder, pattern)
Signature: (folder:string * pattern:string) -> FileInfo []

Gets all files with the given pattern

force lz
Signature: lz:Lazy<'a> -> 'a
Type parameters: 'a
getDefaultProxyFor
Signature: string -> WebProxy
getDirectoryInfoForLocalNuGetFeed (...)
Signature: pathInfo:PathReference -> alternativeProjectRoot:string option -> root:string -> DirectoryInfo
getFileEncoding path
Signature: path:string -> Encoding
GetHomeDirectory ()
Signature: unit -> string
getTargetFolder (...)
Signature: root:string -> groupName:GroupName -> packageName:PackageName -> version:obj -> includeVersionInPath:bool -> string
getXmlFromUrl (auth, url)
Signature: (auth:Auth option * url:string) -> Async<string>
isLinux
Signature: bool

Determines if the current system is a Linux system

isMacOS
Signature: bool

Determines if the current system is a MacOs system

isMatchingOperatingSystem (...)
Signature: operatingSystemFilter:string option -> bool
isMatchingPlatform operatingSystemFilter
Signature: operatingSystemFilter:string option -> bool
isMono
Signature: bool

Determines if the current system is a mono system Todo: Detect mono on windows

isMonoRuntime
Signature: bool
isNotNull x
Signature: x:'?11094 -> bool
Type parameters: '?11094
isUnix
Signature: bool

Determines if the current system is an Unix system

isWindows
Signature: bool

Determines if the current system is a Windows system

monoPath
Signature: string
normalizeFeedUrl source
Signature: source:string -> string
normalizeLineEndings text
Signature: text:string -> string
normalizeLocalPath path
Signature: path:string -> PathReference
normalizePath path
Signature: path:string -> string
notNullOrEmpty
Signature: string -> bool
parseKeyValuePairs s
Signature: s:string -> Dictionary<string,string>
ProgramFiles
Signature: string

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

ProgramFilesX86
Signature: 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

readAnswer ()
Signature: unit -> string
removeComment text
Signature: text:string -> string
removeFile fileName
Signature: fileName:string -> Result<unit,DomainMessage>
rethrowf f inner fmt
Signature: f:(string * 'a -> 'b) -> inner:'a -> fmt:StringFormat<'c,'d> -> 'c
Type parameters: 'a, 'b, 'c, 'd
RunInLockedAccessMode (...)
Signature: (rootFolder:string * action:(unit -> 'a)) -> 'a
Type parameters: 'a
saveFile fileName contents
Signature: fileName:string -> contents:string -> Result<unit,DomainMessage>
saveNormalizedXml fileName doc
Signature: fileName:string -> doc:XmlDocument -> Result<unit,DomainMessage>
sndOf3 (arg1, v, arg3)
Signature: ('?11080 * v:'?11081 * '?11082) -> '?11081
Type parameters: '?11080, '?11081, '?11082

SecurityProtocolType.Tls ||| SecurityProtocolType.Tls11 ||| SecurityProtocolType.Tls12 ||| SecurityProtocolType.Ssl3

SystemRoot
Signature: string

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

thirdOf3 (arg1, arg2, v)
Signature: ('?11084 * '?11085 * v:'?11086) -> '?11086
Type parameters: '?11084, '?11085, '?11086
TimeSpanToReadableString span
Signature: span:TimeSpan -> string
toLower str
Signature: str:^a -> string
Type parameters: ^a
tryGet key this
Signature: key:^k -> this:^a -> 'v option
Type parameters: ^k, ^a, 'v
windowsPath path
Signature: path:string -> string

Type extensions

Type extensionDescription
AddLine(text)
Signature: text:string -> unit

CompiledName: StringBuilder.AddLine

AppendLinef(text)
Signature: text:StringFormat<'a,StringBuilder> -> 'a
Type parameters: 'a

CompiledName: StringBuilder.AppendLinef

DownloadData(uri)
Signature: uri:string -> byte []

CompiledName: HttpClient.DownloadData

DownloadData(uri)
Signature: uri:Uri -> byte []

CompiledName: HttpClient.DownloadData

DownloadDataTaskAsync(uri, tok)
Signature: (uri:Uri * tok:CancellationToken) -> Task<byte []>

CompiledName: HttpClient.DownloadDataTaskAsync

DownloadDataTaskAsync(uri, tok)
Signature: (uri:string * tok:CancellationToken) -> Task<byte []>

CompiledName: HttpClient.DownloadDataTaskAsync

DownloadFile(uri, filePath)
Signature: (uri:string * filePath:string) -> unit

CompiledName: HttpClient.DownloadFile

DownloadFile(uri, filePath)
Signature: (uri:Uri * filePath:string) -> unit

CompiledName: HttpClient.DownloadFile

DownloadFileTaskAsync(...)
Signature: (uri:Uri * tok:CancellationToken * filePath:string) -> Task<unit>

CompiledName: HttpClient.DownloadFileTaskAsync

DownloadFileTaskAsync(...)
Signature: (uri:string * tok:CancellationToken * filePath:string) -> Task<unit>

CompiledName: HttpClient.DownloadFileTaskAsync

DownloadString(uri)
Signature: uri:string -> string

CompiledName: HttpClient.DownloadString

DownloadString(uri)
Signature: uri:Uri -> string

CompiledName: HttpClient.DownloadString

DownloadStringTaskAsync(uri, tok)
Signature: (uri:Uri * tok:CancellationToken) -> Task<string>

CompiledName: HttpClient.DownloadStringTaskAsync

DownloadStringTaskAsync(uri, tok)
Signature: (uri:string * tok:CancellationToken) -> Task<string>

CompiledName: HttpClient.DownloadStringTaskAsync

UploadFileAsMultipart(url filename)
Signature: url:Uri -> filename:string -> unit

CompiledName: WebClient.UploadFileAsMultipart

UploadFileAsMultipart(url filename)
Signature: url:Uri -> filename:string -> HttpResponseMessage

CompiledName: HttpClient.UploadFileAsMultipart

Fork me on GitHub