FSharpx.Extras


IOPrimitives

Namespace: FSharpx.IO

Functions and values

Function or valueDescription
allFilesExist files
Signature: files:seq<string> -> bool

Checks if all given files exists

append s builder
Signature: s:string -> builder:StringBuilder -> StringBuilder

Appends a text

appendFileNamesIfNotNull (...)
Signature: fileNames:seq<string> -> builder:StringBuilder -> StringBuilder

Appends all notnull fileNames

appendIfFalse p
Signature: p:bool -> string -> StringBuilder -> StringBuilder

Appends a text if the predicate is false

appendIfNotNull value s
Signature: value:'?11256 -> s:string -> StringBuilder -> StringBuilder
Type parameters: '?11256

Appends a text if the value is not null

appendIfTrue p s builder
Signature: p:bool -> s:string -> builder:StringBuilder -> StringBuilder

Appends a text if the predicate is true

appendStringIfValueIsNotNull value
Signature: value:'?11258 -> string -> StringBuilder -> StringBuilder
Type parameters: '?11258

Appends a text if the value is not null

appendStringIfValueIsNotNullOrEmpty (...)
Signature: value:string -> string -> StringBuilder -> StringBuilder

Appends a text if the value is not null or empty

checkFileExists fileName
Signature: fileName:string -> unit

Checks if the file exists on disk.

combinePaths path1 path2
Signature: path1:string -> path2:string -> string

Combines two path strings

convertTextToWindowsLineBreaks text
Signature: text:string -> string

Converts the given text from linux or mac linebreaks to windows line breaks

currentDirectory
Signature: string

Gets the current directory

directoryInfo path
Signature: path:string -> DirectoryInfo

Creates a DirectoryInfo for the given path

directorySeparator
Signature: string

The directory separator string. On most systems / or \

fileInfo path
Signature: path:string -> FileInfo

Creates a FileInfo for the given path

filesInDir dir
Signature: dir:DirectoryInfo -> FileInfo []

Gets all files in the directory

fileSystemInfo path
Signature: path:string -> FileSystemInfo

Creates a FileInfo or a DirectoryInfo for the given path

getFullName fileName
Signature: fileName:string -> string

Converts a file to it's full file system name

LinuxLineBreaks
Signature: string
MacLineBreaks
Signature: string
readFile file
Signature: file:string -> seq<string>

Reads a file line by line

readFileAsString file
Signature: file:string -> string

Reads a file as one text

replaceFile fileName lines
Signature: fileName:string -> lines:seq<string> -> unit

Replaces the file with the given string

subDirectories dir
Signature: dir:DirectoryInfo -> DirectoryInfo []

Gets all subdirectories

WindowsLineBreaks
Signature: string
writeStringToFile append file text
Signature: append:bool -> file:string -> text:string -> unit

Writes a single string to a file

writeToFile append fileName lines
Signature: append:bool -> fileName:string -> lines:seq<string> -> unit

Writes a file line by line

Fork me on GitHub