- ActivitySourceIO (ActivityEnv Env)
- StartActivity (string name, ActivityKind kind)
- StartActivity ( string name, ActivityKind kind, ActivityContext parentContext, HashMap<string, object> tags = default, Seq<ActivityLink> links = default, DateTimeOffset startTime = default)
- StartActivity ( string name, ActivityKind kind, string parentId, HashMap<string, object> tags = default, Seq<ActivityLink> links = default, DateTimeOffset startTime = default)
- ConsoleIO
- Default = new ConsoleIO()
- ReadKey ()
- Clear ()
- SetBgColor (ConsoleColor color)
- SetColor (ConsoleColor color)
- ResetColor ()
- BgColor
- Color
- Read ()
- ReadLine ()
- WriteLine ()
- WriteLine (string value)
- Write (string value)
- DirectoryIO
- Default = new DirectoryIO()
- Create (string path)
- Delete (string path, bool recursive = true)
- GetParent (string path)
- Exists (string path)
- SetCreationTime (string path, DateTime creationTime)
- SetCreationTimeUtc (string path, DateTime creationTimeUtc)
- GetCreationTime (string path)
- GetCreationTimeUtc (string path)
- SetLastWriteTime (string path, DateTime lastWriteTime)
- SetLastWriteTimeUtc (string path, DateTime lastWriteTimeUtc)
- GetLastWriteTime (string path)
- GetLastWriteTimeUtc (string path)
- SetLastAccessTime (string path, DateTime lastAccessTime)
- SetLastAccessTimeUtc (string path, DateTime lastAccessTimeUtc)
- GetLastAccessTime (string path)
- GetLastAccessTimeUtc (string path)
- EnumerateDirectories (string path)
- EnumerateDirectories (string path, string searchPattern)
- EnumerateDirectories (string path, string searchPattern, SearchOption searchOption)
- EnumerateFiles (string path)
- EnumerateFiles (string path, string searchPattern)
- EnumerateFiles (string path, string searchPattern, SearchOption searchOption)
- EnumerateFileSystemEntries (string path)
- EnumerateFileSystemEntries (string path, string searchPattern)
- EnumerateFileSystemEntries (string path, string searchPattern, SearchOption searchOption)
- GetDirectoryRoot (string path)
- GetCurrentDirectory ()
- SetCurrentDirectory (string path)
- Move (string sourceDirName, string destDirName)
- GetLogicalDrives ()
- EncodingIO
- EnvironmentIO
- Default = new EnvironmentIO()
- CommandLine ()
- SetCurrentDirectory (string directory)
- CurrentManagedThreadId ()
- Exit (int exitCode)
- ExitCode ()
- SetExitCode (int exitCode)
- ExpandEnvironmentVariables (string name)
- FailFast (Option<string> message)
- FailFast (Option<string> message, Option<Exception> exception)
- GetCommandLineArgs ()
- GetEnvironmentVariable (string variable)
- GetEnvironmentVariable (string variable, EnvironmentVariableTarget target)
- GetEnvironmentVariables ()
- GetEnvironmentVariables (EnvironmentVariableTarget target)
- GetFolderPath (Environment.SpecialFolder folder)
- GetFolderPath (Environment.SpecialFolder folder, Environment.SpecialFolderOption option)
- GetLogicalDrives ()
- HasShutdownStarted ()
- Is64BitOperatingSystem ()
- Is64BitProcess ()
- MachineName ()
- NewLine ()
- OSVersion ()
- ProcessorCount ()
- SetEnvironmentVariable (string variable, Option<string> value)
- SetEnvironmentVariable (string variable, Option<string> value, EnvironmentVariableTarget target)
- StackTrace ()
- SystemDirectory ()
- SystemPageSize ()
- TickCount ()
- UserDomainName ()
- UserInteractive ()
- UserName ()
- Version ()
- WorkingSet ()
- FileIO
- Default = new FileIO()
- Copy (string fromPath, string toPath, bool overwrite = false)
- Move (string fromPath, string toPath)
- Move (string fromPath, string toPath, bool overwrite)
- AppendAllLines (string path, IEnumerable<string> lines, Encoding encoding)
- ReadAllLines (string path, Encoding encoding)
- WriteAllLines (string path, IEnumerable<string> lines, Encoding encoding)
- ReadAllText (string path, Encoding encoding)
- ReadAllBytes (string path)
- WriteAllText (string path, string text, Encoding encoding)
- WriteAllBytes (string path, byte[] data)
- Delete (string path)
- Exists (string path)
- OpenText (string path)
- CreateText (string path)
- AppendText (string path)
- OpenRead (string path)
- Open (string path, FileMode mode)
- Open (string path, FileMode mode, FileAccess access)
- OpenWrite (string path)
- TextReadIO
- Default = new TextReadIO()
- ReadLine (TextReader reader)
- ReadToEnd (TextReader reader)
- Read (TextReader reader, Memory<char> buffer)
- Close (TextReader reader)
- TimeIO
record ActivitySourceIO (ActivityEnv Env) Source #
method IO<Activity?> StartActivity (string name, ActivityKind kind) Source #
Creates a new activity if there are active listeners for it, using the specified name and activity kind.
param | name | The operation name of the activity. |
param | kind | The activity kind. |
returns | The created activity object, if it had active listeners, or |
method IO<Activity?> StartActivity ( string name, ActivityKind kind, ActivityContext parentContext, HashMap<string, object> tags = default, Seq<ActivityLink> links = default, DateTimeOffset startTime = default) Source #
Creates a new activity if there are active listeners for it, using the specified name, activity kind, parent activity context, tags, optional activity link and optional start time.
param | name | The operation name of the activity. |
param | kind | The activity kind. |
param | parentContext | The parent |
param | tags | The optional tags list to initialise the created activity object with. |
param | links | The optional |
param | startTime | The optional start timestamp to set on the created activity object. |
returns | The created activity object, if it had active listeners, or null if it has no event listeners. |
method IO<Activity?> StartActivity ( string name, ActivityKind kind, string parentId, HashMap<string, object> tags = default, Seq<ActivityLink> links = default, DateTimeOffset startTime = default) Source #
Creates a new activity if there are active listeners for it, using the specified name, activity kind, parent activity context, tags, optional activity link and optional start time.
param | name | The operation name of the activity. |
param | kind | The activity kind. |
param | parentId | The parent Id to initialize the created activity object with. |
param | tags | The optional tags list to initialise the created activity object with. |
param | links | The optional |
param | startTime | The optional start timestamp to set on the created activity object. |
returns | The created activity object, if it had active listeners, or null if it has no event listeners. |
field Sys.Traits.ConsoleIO Default = new ConsoleIO() Source #
method IO<Unit> SetBgColor (ConsoleColor color) Source #
method IO<Unit> ResetColor () Source #
record DirectoryIO Source #
field Traits.DirectoryIO Default = new DirectoryIO() Source #
method IO<Unit> SetCreationTime (string path, DateTime creationTime) Source #
method IO<Unit> SetCreationTimeUtc (string path, DateTime creationTimeUtc) Source #
method IO<DateTime> GetCreationTime (string path) Source #
method IO<DateTime> GetCreationTimeUtc (string path) Source #
method IO<Unit> SetLastWriteTime (string path, DateTime lastWriteTime) Source #
method IO<Unit> SetLastWriteTimeUtc (string path, DateTime lastWriteTimeUtc) Source #
method IO<DateTime> GetLastWriteTime (string path) Source #
method IO<DateTime> GetLastWriteTimeUtc (string path) Source #
method IO<Unit> SetLastAccessTime (string path, DateTime lastAccessTime) Source #
method IO<Unit> SetLastAccessTimeUtc (string path, DateTime lastAccessTimeUtc) Source #
method IO<DateTime> GetLastAccessTime (string path) Source #
method IO<DateTime> GetLastAccessTimeUtc (string path) Source #
method IO<Seq<string>> EnumerateDirectories (string path) Source #
method IO<Seq<string>> EnumerateDirectories (string path, string searchPattern) Source #
method IO<Seq<string>> EnumerateDirectories (string path, string searchPattern, SearchOption searchOption) Source #
method IO<Seq<string>> EnumerateFiles (string path) Source #
method IO<Seq<string>> EnumerateFiles (string path, string searchPattern) Source #
method IO<Seq<string>> EnumerateFiles (string path, string searchPattern, SearchOption searchOption) Source #
method IO<Seq<string>> EnumerateFileSystemEntries (string path) Source #
method IO<Seq<string>> EnumerateFileSystemEntries (string path, string searchPattern) Source #
method IO<Seq<string>> EnumerateFileSystemEntries (string path, string searchPattern, SearchOption searchOption) Source #
method IO<string> GetDirectoryRoot (string path) Source #
method IO<string> GetCurrentDirectory () Source #
method IO<Unit> SetCurrentDirectory (string path) Source #
method IO<Seq<string>> GetLogicalDrives () Source #
record EnvironmentIO Source #
field Sys.Traits.EnvironmentIO Default = new EnvironmentIO() Source #
method IO<string> CommandLine () Source #
Gets the command line for this process.
method IO<Unit> SetCurrentDirectory (string directory) Source #
Sets the fully qualified path of the current working directory.
method IO<int> CurrentManagedThreadId () Source #
Gets a unique identifier for the current managed thread.
method IO<Unit> Exit (int exitCode) Source #
Terminates this process and returns an exit code to the operating
method IO<Unit> SetExitCode (int exitCode) Source #
Sets the exit code of the process.
method IO<string> ExpandEnvironmentVariables (string name) Source #
Replaces the name of each environment variable embedded in the specified string with the string equivalent of the value of the variable, then returns the resulting string.
method IO<Unit> FailFast (Option<string> message) Source #
Immediately terminates a process after writing a message to the Windows Application event log, and then includes the message in error reporting to Microsoft.
method IO<Unit> FailFast (Option<string> message, Option<Exception> exception) Source #
Immediately terminates a process after writing a message to the Windows Application event log, and then includes the message and exception information in error reporting to Microsoft.
method IO<Seq<string>> GetCommandLineArgs () Source #
Returns a string array containing the command-line arguments for the current process.
method IO<Option<string>> GetEnvironmentVariable (string variable) Source #
Retrieves the value of an environment variable from the current process.
method IO<Option<string>> GetEnvironmentVariable (string variable, EnvironmentVariableTarget target) Source #
Retrieves the value of an environment variable from the current process or from the Windows operating system registry key for the current user or local machine.
method IO<HashMap<string, Option<string>>> GetEnvironmentVariables () Source #
Retrieves all environment variable names and their values from the current process.
method IO<HashMap<string, Option<string>>> GetEnvironmentVariables (EnvironmentVariableTarget target) Source #
Retrieves all environment variable names and their values from the current process, or from the Windows operating system registry key for the current user or local machine.
method IO<string> GetFolderPath (Environment.SpecialFolder folder) Source #
Gets the path to the system special folder that is identified by the specified enumeration.
method IO<string> GetFolderPath (Environment.SpecialFolder folder, Environment.SpecialFolderOption option) Source #
Gets the path to the system special folder that is identified by the specified enumeration, and uses a specified option for accessing special folders.
method IO<Seq<string>> GetLogicalDrives () Source #
Returns an array of string containing the names of the logical drives on the current computer.
method IO<bool> HasShutdownStarted () Source #
Gets a value that indicates whether the current application domain is being unloaded or the common language runtime (CLR) is shutting down.
method IO<bool> Is64BitOperatingSystem () Source #
Determines whether the current operating system is a 64-bit operating
method IO<bool> Is64BitProcess () Source #
Determines whether the current process is a 64-bit process.
method IO<string> MachineName () Source #
Gets the NetBIOS name of this local computer.
method IO<OperatingSystem> OSVersion () Source #
Gets an OperatingSystem object that contains the current platform identifier and version number.
method IO<int> ProcessorCount () Source #
Gets the number of processors on the current machine.
method IO<Unit> SetEnvironmentVariable (string variable, Option<string> value) Source #
Creates, modifies, or deletes an environment variable stored in the current process.
method IO<Unit> SetEnvironmentVariable (string variable, Option<string> value, EnvironmentVariableTarget target) Source #
Creates, modifies, or deletes an environment variable stored in the current process or in the Windows operating system registry key reserved for the current user or local machine.
method IO<string> StackTrace () Source #
Gets current stack trace information.
method IO<string> SystemDirectory () Source #
Gets the fully qualified path of the system directory.
method IO<int> SystemPageSize () Source #
Gets the number of bytes in the operating system's memory page.
method IO<long> TickCount () Source #
Gets the number of milliseconds elapsed since the system started.
method IO<string> UserDomainName () Source #
Gets the network domain name associated with the current user.
method IO<bool> UserInteractive () Source #
Gets a value indicating whether the current process is running in user interactive mode.
method IO<string> UserName () Source #
Gets the user name of the person who is currently logged on to the operating
method IO<Version> Version () Source #
Gets a Version object that describes the major, minor, build, and revision numbers of the common language runtime.
method IO<long> WorkingSet () Source #
Gets the amount of physical memory mapped to the process context.
Real world interaction with the file-system
field Sys.Traits.FileIO Default = new FileIO() Source #
method IO<Unit> Copy (string fromPath, string toPath, bool overwrite = false) Source #
Copy file from one place to another
method IO<Unit> Move (string fromPath, string toPath, bool overwrite) Source #
Move file from one place to another
method IO<Unit> AppendAllLines (string path, IEnumerable<string> lines, Encoding encoding) Source #
Append lines to the end of a file
method IO<Seq<string>> ReadAllLines (string path, Encoding encoding) Source #
Read all lines from a file
method IO<Unit> WriteAllLines (string path, IEnumerable<string> lines, Encoding encoding) Source #
Write all lines to a file
method IO<string> ReadAllText (string path, Encoding encoding) Source #
Read text from a file
method IO<byte[]> ReadAllBytes (string path) Source #
Read data from a file
method IO<Unit> WriteAllText (string path, string text, Encoding encoding) Source #
Write text to a file
method IO<Unit> WriteAllBytes (string path, byte[] data) Source #
Write data to a file
method IO<TextWriter> CreateText (string path) Source #
Create a new text file to stream to
method IO<TextWriter> AppendText (string path) Source #
Return a stream to append text to
record TextReadIO Source #
field Sys.Traits.TextReadIO Default = new TextReadIO() Source #