LanguageExt.Sys

LanguageExt.Sys Sys IO

Contents

class Directory <RT> Source #

where RT : struct, HasDirectory<RT>

Properties

property Eff<RT, string> current Source #

Get the current directory

property Eff<RT, Seq<string>> logicalDrives Source #

Get the logical drives

Methods

method Eff<RT, Unit> create (string path) Source #

Create a directory

method Eff<RT, Unit> delete (string path, bool recursive = true) Source #

Delete a directory

method Eff<RT, Option<DirectoryInfo>> getParent (string path) Source #

Get parent directory

method Eff<RT, bool> exists (string path) Source #

Check if directory exists

method Eff<RT, Unit> setCreationTime (string path, DateTime creationTime) Source #

Set the directory creation time

method Eff<RT, Unit> setCreationTimeUtc (string path, DateTime creationTimeUtc) Source #

Set the directory creation time

method Eff<RT, DateTime> getCreationTime (string path) Source #

Get the directory creation time

method Eff<RT, DateTime> getCreationTimeUtc (string path) Source #

Get the directory creation time

method Eff<RT, Unit> setLastWriteTime (string path, DateTime lastWriteTime) Source #

Set the directory last write time

method Eff<RT, Unit> setLastWriteTimeUtc (string path, DateTime lastWriteTimeUtc) Source #

Set the directory last write time

method Eff<RT, DateTime> getLastWriteTime (string path) Source #

Get the directory last write time

method Eff<RT, DateTime> getLastWriteTimeUtc (string path) Source #

Get the directory last write time

method Eff<RT, Unit> setLastAccessTime (string path, DateTime lastAccessTime) Source #

Set the directory last access time

method Eff<RT, Unit> setLastAccessTimeUtc (string path, DateTime lastAccessTimeUtc) Source #

Set the directory last access time

method Eff<RT, DateTime> getLastAccessTime (string path) Source #

Get the directory last access time

method Eff<RT, DateTime> getLastAccessTimeUtc (string path) Source #

Get the directory last access time

method Eff<RT, Seq<string>> enumerateDirectories (string path) Source #

Enumerate directories

method Eff<RT, Seq<string>> enumerateDirectories (string path, string searchPattern) Source #

Enumerate directories

method Eff<RT, Seq<string>> enumerateDirectories (string path, string searchPattern, SearchOption searchOption) Source #

Enumerate directories

method Eff<RT, Seq<string>> enumerateFiles (string path) Source #

Enumerate files

method Eff<RT, Seq<string>> enumerateFiles (string path, string searchPattern) Source #

Enumerate files

method Eff<RT, Seq<string>> enumerateFiles (string path, string searchPattern, SearchOption searchOption) Source #

Enumerate files

method Eff<RT, Seq<string>> enumerateFileSystemEntries (string path) Source #

Enumerate file system entries

method Eff<RT, Seq<string>> enumerateFileSystemEntries (string path, string searchPattern) Source #

Enumerate file system entries

method Eff<RT, Seq<string>> enumerateFileSystemEntries (string path, string searchPattern, SearchOption searchOption) Source #

Enumerate file system entries

method Eff<RT, string> getRoot (string path) Source #

Get the root of the path provided

method Eff<RT, Unit> setCurrent (string path) Source #

Set the current directory

Parameters

param path

method Eff<RT, Unit> move (string sourceDirName, string destDirName) Source #

Move a directory

class File <RT> Source #

where RT : struct, HasFile<RT>

File IO

Methods

method Eff<RT, Unit> copy (string fromPath, string toPath, bool overwrite = false) Source #

Copy file

Parameters

type RT

Runtime

param fromPath

Source path

param toPath

Destination path

param overwrite

Overwrite if the file already exists at the destination

returns

Unit

method Aff<RT, Unit> appendAllLines (string path, IEnumerable<string> contents) Source #

Append lines to the end of the file provided

method Aff<RT, Seq<string>> readAllLines (string path) Source #

Read all of the lines from the path provided

method Aff<RT, Unit> writeAllLines (string path, Seq<string> lines) Source #

Write all of the lines to the path provided

method Aff<RT, string> readAllText (string path) Source #

Read all of the text from the path provided

method Aff<RT, byte[]> readAllBytes (string path) Source #

Read all of the data from the path provided

method Aff<RT, Unit> writeAllText (string path, string text) Source #

Write all of the text to the path provided

method Aff<RT, Unit> writeAllBytes (string path, byte[] data) Source #

Write all of the data to the path provided

method Eff<RT, Unit> delete (string path) Source #

Delete the file provided

method Eff<RT, bool> exists (string path) Source #

True if a file exists at the path

method Producer<RT, TextReader, Unit> openText (string path) Source #

Open a text file

method Eff<RT, TextWriter> createText (string path) Source #

Create a new text file to stream to

method Eff<RT, TextWriter> appendText (string path) Source #

Return a stream to append text to

method Producer<RT, Stream, Unit> openRead (string path) Source #

Open a file-stream

method Producer<RT, Stream, Unit> open (string path, FileMode mode) Source #

Open a file-stream

method Producer<RT, Stream, Unit> open (string path, FileMode mode, FileAccess access) Source #

Open a file-stream

method Producer<RT, Stream, Unit> openWrite (string path) Source #

Open a file-stream

class Stream <RT> Source #

where RT : struct, HasCancel<RT>

Methods

method Pipe<RT, Stream, SeqLoan<byte>, Unit> read (int chunkSize) Source #

Get a pipe of chunks from a Stream

class TextRead <RT> Source #

where RT : struct, HasTextRead<RT>

Properties

property Pipe<RT, TextReader, string, Unit> readLine Source #

Open a text file and streams the lines through the pipe

property Pipe<RT, TextReader, char, Unit> readChar Source #

Open a text file and streams the chars through the pipe

property Pipe<RT, TextReader, string, Unit> readToEnd Source #

Read the rest of the text in the stream

Methods

method Pipe<RT, TextReader, SeqLoan<char>, Unit> readChars (int charCount) Source #

Repeatedly read a number of chars from the stream

method Pipe<RT, TextReader, string, Unit> read (int charCount) Source #

Read a number of chars from the stream

method Eff<RT, Unit> close (TextReader reader) Source #

Close the reader