[Home] Module Microsoft.FSharp.Compatibility.OCaml.Sys


Sys: Basic system operations (for ML compatibility) This module is only included to make it possible to cross-compile code with other ML compilers. It may be deprecated and/or removed in a future release. You may wish to use .NET functions directly instead.

Values

ValueDescription
val argv : string array
The usual argv command line array. Gives the command line arguments as returned by System.Environment.GetCommandLineArgs().
val chdir : string -> unit
Sets the current working directory for the process using [[System.IO.Directory.SetCurrentDirectory]]
val command : string -> int
Run the command and return it's exit code. Warning: 'command' currently attempts to execute the string using the 'cmd.exe' shell processor. If it is not present on the system then the operation will fail. Use System.Diagnostics.Process directly to run commands in a portable way, which involves specifying the program to run and the arguments independently.
val executable_name : string
Path of the current executable, using
 System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory,
                           System.AppDomain.CurrentDomain.FriendlyName)  
 
val file_exists : string -> bool
Returns true if a file currently exists, using System.IO.File.Exists(s).
val getcwd : unit -> string
Returns the current working directory for the process using [[System.IO.Directory.GetCurrentDirectory]]
val getenv : string -> string
System.Environment.GetEnvironmentVariable, raising [[Not_found]] if the variable is not defined.
val remove : string -> unit
Deletes a file using System.IO.File.Delete(s).
val rename : string -> string -> unit
Eename a file on disk using System.IO.File.Move
val time : unit -> float
Time consumed by the main thread. (for approximate timings). Generally returns only the processor time used by the main thread of the application.
val word_size : int
The number of bits in the "int" type.

See Also

Microsoft.FSharp.Compatibility.OCaml


Documentation for assembly FSharp.Compatibility, version 1.9.4.19, generated using F# version 1.9.4.19