- ConsoleIO (MemoryConsole mem)
- ReadKey ()
- Clear ()
- SetBgColor (ConsoleColor color)
- SetColor (ConsoleColor color)
- ResetColor ()
- BgColor
- Color
- Read ()
- ReadLine ()
- WriteLine ()
- WriteLine (string value)
- Write (string value)
- DirectoryIO (string root)
- 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 ()
- EnvironmentIO (MemorySystemEnvironment env)
- CommandLine ()
- 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 (string root)
- 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)
- ReadAllBytes (string path)
- WriteAllLines (string path, IEnumerable<string> lines, Encoding encoding)
- WriteAllBytes (string path, byte[] data)
- ReadAllText (string path, Encoding encoding)
- WriteAllText (string path, string text, Encoding encoding)
- 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)
- TestTimeSpec (Schedule Schedule, DateTime Start)
- FixedFromSpecified (DateTime start)
- FixedFromNow (DateTime start)
- RunningFromSpecified (DateTime start)
- RunningFromNow ()
- TextReadIO
- Default = new TextReadIO()
- ReadLine (TextReader reader)
- ReadToEnd (TextReader reader)
- Read (TextReader reader, Memory<char> buffer)
- Close (TextReader reader)
- TimeIO
record ConsoleIO (MemoryConsole mem) Source #
Encapsulated in-memory console No public API exists for this. Use Sys.IO.Console.* to interact with the console
Primarily used for testing (for use with TestRuntime or your own testing runtime)
method IO<Unit> SetBgColor (ConsoleColor color) Source #
method IO<Unit> ResetColor () Source #
record DirectoryIO (string root) 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 (MemorySystemEnvironment env) Source #
method IO<string> CommandLine () Source #
Gets the command line for this process.
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 system.
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 system.
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 system.
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.
record FileIO (string root) Source #
Test world interaction with the file-system
Primarily used for testing (for use with TestRuntime or your own testing runtime)
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<byte[]> ReadAllBytes (string path) 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<Unit> WriteAllBytes (string path, byte[] data) Source #
Write all lines to a file
method IO<string> ReadAllText (string path, Encoding encoding) Source #
Read text from a file
method IO<Unit> WriteAllText (string path, string text, Encoding encoding) Source #
Write text 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 TestTimeSpec (Schedule Schedule, DateTime Start) Source #
method TestTimeSpec FixedFromSpecified (DateTime start) Source #
Time never passes, it has a constant value of start
method TestTimeSpec FixedFromNow (DateTime start) Source #
Time never passes, it has a constant value of DateTime.Now
(as it was set when you call this method)
method TestTimeSpec RunningFromSpecified (DateTime start) Source #
Time passes at 1 millisecond per tick starting from start
method TestTimeSpec RunningFromNow () Source #
Time passes at 1 millisecond per tick starting from DateTime.Now
struct TextReadIO Source #
field Sys.Traits.TextReadIO Default = new TextReadIO() Source #