FSharpx.Extras


IOPrimitives Module

Functions and values

Function or value Description

LinuxLineBreaks

Full Usage: LinuxLineBreaks

Returns: string
Returns: string

MacLineBreaks

Full Usage: MacLineBreaks

Returns: string
Returns: string

WindowsLineBreaks

Full Usage: WindowsLineBreaks

Returns: string
Returns: string

allFilesExist files

Full Usage: allFilesExist files

Parameters:
    files : string seq

Returns: bool

Checks if all given files exists

files : string seq
Returns: bool

append s builder

Full Usage: append s builder

Parameters:
Returns: StringBuilder
Modifiers: inline

Appends a text

s : string
builder : StringBuilder
Returns: StringBuilder

appendFileNamesIfNotNull fileNames builder

Full Usage: appendFileNamesIfNotNull fileNames builder

Parameters:
Returns: StringBuilder
Modifiers: inline

Appends all notnull fileNames

fileNames : string seq
builder : StringBuilder
Returns: StringBuilder

appendIfFalse p

Full Usage: appendIfFalse p

Parameters:
    p : bool

Returns: string -> StringBuilder -> StringBuilder
Modifiers: inline

Appends a text if the predicate is false

p : bool
Returns: string -> StringBuilder -> StringBuilder

appendIfNotNull value s

Full Usage: appendIfNotNull value s

Parameters:
    value : 'a
    s : string

Returns: StringBuilder -> StringBuilder
Modifiers: inline

Appends a text if the value is not null

value : 'a
s : string
Returns: StringBuilder -> StringBuilder

appendIfTrue p s builder

Full Usage: appendIfTrue p s builder

Parameters:
Returns: StringBuilder
Modifiers: inline

Appends a text if the predicate is true

p : bool
s : string
builder : StringBuilder
Returns: StringBuilder

appendStringIfValueIsNotNull value

Full Usage: appendStringIfValueIsNotNull value

Parameters:
    value : 'a

Returns: string -> StringBuilder -> StringBuilder
Modifiers: inline

Appends a text if the value is not null

value : 'a
Returns: string -> StringBuilder -> StringBuilder

appendStringIfValueIsNotNullOrEmpty value

Full Usage: appendStringIfValueIsNotNullOrEmpty value

Parameters:
    value : string

Returns: string -> StringBuilder -> StringBuilder
Modifiers: inline

Appends a text if the value is not null or empty

value : string
Returns: string -> StringBuilder -> StringBuilder

checkFileExists fileName

Full Usage: checkFileExists fileName

Parameters:
    fileName : string

Checks if the file exists on disk.

fileName : string

combinePaths path1 path2

Full Usage: combinePaths path1 path2

Parameters:
    path1 : string
    path2 : string

Returns: string
Modifiers: inline

Combines two path strings

path1 : string
path2 : string
Returns: string

convertTextToWindowsLineBreaks text

Full Usage: convertTextToWindowsLineBreaks text

Parameters:
    text : string

Returns: string

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

text : string
Returns: string

currentDirectory

Full Usage: currentDirectory

Returns: string

Gets the current directory

Returns: string

directoryInfo path

Full Usage: directoryInfo path

Parameters:
    path : string

Returns: DirectoryInfo
Modifiers: inline

Creates a DirectoryInfo for the given path

path : string
Returns: DirectoryInfo

directorySeparator

Full Usage: directorySeparator

Returns: string

The directory separator string. On most systems / or \

Returns: string

fileInfo path

Full Usage: fileInfo path

Parameters:
    path : string

Returns: FileInfo
Modifiers: inline

Creates a FileInfo for the given path

path : string
Returns: FileInfo

fileSystemInfo path

Full Usage: fileSystemInfo path

Parameters:
    path : string

Returns: FileSystemInfo
Modifiers: inline

Creates a FileInfo or a DirectoryInfo for the given path

path : string
Returns: FileSystemInfo

filesInDir dir

Full Usage: filesInDir dir

Parameters:
Returns: FileInfo[]
Modifiers: inline

Gets all files in the directory

dir : DirectoryInfo
Returns: FileInfo[]

getFullName fileName

Full Usage: getFullName fileName

Parameters:
    fileName : string

Returns: string
Modifiers: inline

Converts a file to it's full file system name

fileName : string
Returns: string

readFile file

Full Usage: readFile file

Parameters:
    file : string

Returns: string seq

Reads a file line by line

file : string
Returns: string seq

readFileAsString file

Full Usage: readFileAsString file

Parameters:
    file : string

Returns: string

Reads a file as one text

file : string
Returns: string

replaceFile fileName lines

Full Usage: replaceFile fileName lines

Parameters:
    fileName : string
    lines : string seq

Replaces the file with the given string

fileName : string
lines : string seq

subDirectories dir

Full Usage: subDirectories dir

Parameters:
Returns: DirectoryInfo[]
Modifiers: inline

Gets all subdirectories

dir : DirectoryInfo
Returns: DirectoryInfo[]

writeStringToFile append file text

Full Usage: writeStringToFile append file text

Parameters:
    append : bool
    file : string
    text : string

Writes a single string to a file

append : bool
file : string
text : string

writeToFile append fileName lines

Full Usage: writeToFile append fileName lines

Parameters:
    append : bool
    fileName : string
    lines : string seq

Writes a file line by line

append : bool
fileName : string
lines : string seq