Gets the current time and returns the UNIX timestamp.
Gets the system's hostname.
Opens a file and returns the file-descriptor number.
Reads from an opened file-descriptor and returns the read data.
nil
will be returned if there is no more data to be read.
Writes data to the opened file-descriptor.
Seeks to a position within the file. The whence
argument must be one of the
following strings:
"SEEK_SET"
- seek from beginning of file."SEEK_CUR"
- seek from current position."SEEK_END"
- seek from end of file."SEEK_DATA"
- seek to next data."SEEK_HOLE"
- seek to next hole.
Queries the current position within the file.
Performs a ioctl()
operation on the file-descriptor.
Performs a fcntl()
operation on the file-descriptor.
Queries file information from the given file-descriptor and returns a Hash of file metadata.
Closes an opened file-descriptor.
Gets the current working directory and returns the directory path.
Changes the current working directory.
Reads the entire file at the given path and returns the full file's contents.
Reads the destination path of a symbolic link.
Reads the contents of the directory and returns an Array of directory entry names.
Evaluates a directory glob pattern and returns all matching paths.
Creates a temporary file with the given file basename.
Creates a new directory at the given path.
Copies a source file to the destination path.
Removes a file at the given path.
Removes an empty directory at the given path.
Moves or renames a source file to a destination path.
Creates a symbolic link at the destination path pointing to the source path.
Changes the group ownership of a file or directory.
Changes the user ownership of a file or directory.
Changes the permissions on a file or directory.
Queries file information from the given path and returns a Hash of file metadata.
Gets the current process's Process ID (PID).
Gets the current process's parent Process ID (PPID).
Gets the current process's user ID (UID).
Sets the current process's user ID (UID) to the given Integer.
Gets the current process's effective UID (EUID).
Sets the current process's effective UID (EUID) to the given Integer.
Gets the current process's group ID (GID).
Sets the current process's group ID (GID) to the given Integer.
Gets the current process's effective group ID (EGID).
Sets the current process's effective group ID (EGID) to the given Integer.
Gets the current process's session ID (SID).
Sets the current process's session ID (SID).
Queries all environment variables of the current process. Returns a Hash of the env variable names and values.
Gets an individual environment variable. If the environment variable has not
been set, nil
will be returned.
Sets an environment variable to the given value.
Un-sets an environment variable.
Kills another process using the given Process ID (POD) and the signal number.
Opens a new process using the given command string. The file descriptor of the new process will be returned.
Reads data from the file descriptor returned by process_popen
.
Writes data to the file descriptor returned by process_popen
.
Closes the file descriptor of a remote process opened via process_popen
.
Spawns a new process using the given program and additional arguments. The process ID (PID) of the new process will be returned.
Exits the current process.
Executes the given shell command and returns it's output.