Mojo module
os
Provides functions to access operating-system dependent functionality, including file system operations.
You can import a method from the os package. For example:
from os import listdirAliases
SEEK_CUR
alias SEEK_CUR = 1
Seek from the current position.
SEEK_END
alias SEEK_END = 2
Seek from the end of the file.
SEEK_SET
alias SEEK_SET = 0
Seek from the beginning of the file.
sep
alias sep = "/"
Functions
-
abort: Calls a target dependent trap instruction if available. -
getuid: Retrieve the user ID of the calling process. -
isatty: Checks whether a file descriptor refers to a terminal. -
listdir: Gets the list of entries contained in the path provided. -
makedirs: Creates a specified leaf directory along with any necessary intermediate directories that don't already exist. -
mkdir: Creates a directory at the specified path. -
remove: Removes the specified file. -
removedirs: Removes a leaf directory and all empty intermediate ones. -
rmdir: Removes the specified directory. -
unlink: Removes the specified file.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!