Skip to content

Latest commit

 

History

History
118 lines (83 loc) · 3.08 KB

os.md

File metadata and controls

118 lines (83 loc) · 3.08 KB

os

class os.CommandResult

Source: /home/runner/work/aspl/aspl/stdlib/os/CommandResult.aspl:2:1

method construct

Source: /home/runner/work/aspl/aspl/stdlib/os/CommandResult.aspl:10:5

method construct(int exitCode, string output)

enum os.Architecture

Source: /home/runner/work/aspl/aspl/stdlib/os/Architecture.aspl:2:1


function os.architecture_from_string

Source: /home/runner/work/aspl/aspl/stdlib/os/Architecture.aspl:12:1

function architecture_from_string(string arch) returns Architecture?

function os.args

Source: /home/runner/work/aspl/aspl/stdlib/os/args.aspl:4:1

function args() returns list<string>

args returns the cli arguments passed to the currently running process

function os.execute

Source: /home/runner/work/aspl/aspl/stdlib/os/commands.aspl:3:1

function execute(string command) returns CommandResult

execute executes a program and returns the exit code and the output

function os.system

Source: /home/runner/work/aspl/aspl/stdlib/os/commands.aspl:10:1

function system(string command) returns int

system executes a program (like os.execute()), but only returns the exit code

function os.execvp

Source: /home/runner/work/aspl/aspl/stdlib/os/commands.aspl:17:1

function execvp(string command, list<string> args)

execvp executes a program in place of the current process

function os.getwd

Source: /home/runner/work/aspl/aspl/stdlib/os/fs.aspl:3:1

function getwd() returns string

getwd returns the current working directory

function os.chdir

Source: /home/runner/work/aspl/aspl/stdlib/os/fs.aspl:9:1

function chdir(string path)

chdir changes the current working directory to the specified path

function os.chmod

Source: /home/runner/work/aspl/aspl/stdlib/os/fs.aspl:15:1

function chmod(string path, int mode)

chmod changes the mode of the specified file to the specified mode

function os.create_temp_dir

Source: /home/runner/work/aspl/aspl/stdlib/os/fs.aspl:21:1

function create_temp_dir() returns string

create_temp_dir creates and returns a unique ephemeral directory suitable for storing temporary files

function os.user_os

Source: /home/runner/work/aspl/aspl/stdlib/os/os.aspl:3:1

function user_os() returns string

user_os returns the name of the operating system currently used to execute this program

function os.user_architecture

Source: /home/runner/work/aspl/aspl/stdlib/os/os.aspl:9:1

function user_architecture() returns string

user_architecture returns the name of the architecture currently used to execute this program

function os.user_architecture_generic

Source: /home/runner/work/aspl/aspl/stdlib/os/os.aspl:15:1

function user_architecture_generic() returns Architecture

user_architecture_generic returns a value from the Architecture enum and is more generic than os.user_architecture()