module
os
Implements os methods.
You can import a method from the os
package. For example:
from os import listdir
Aliases
-
sep = "\\" if eq(:string target_get_field(current_target(), "os"), "windows") else "/"
: -
SEEK_SET = 0
: Seek from the beginning of the file. -
SEEK_CUR = 1
: Seek from the current position. -
SEEK_END = 2
: Seek from the end of the file.
Functions
-
listdir
: Gets the list of entries contained in the path provided. -
abort
: Calls a target dependent trap instruction if available. -
remove
: Removes the specified file. If the path is a directory or it can not be deleted, an error is raised. Absolute and relative paths are allowed, relative paths are resolved from cwd. -
unlink
: Removes the specified file. If the path is a directory or it can not be deleted, an error is raised. Absolute and relative paths are allowed, relative paths are resolved from cwd. -
mkdir
: Creates a directory at the specified path. If the directory can not be created an error is raised. Absolute and relative paths are allowed, relative paths are resolved from cwd. -
rmdir
: Removes the specified directory. If the path is not a directory or it can not be deleted, an error is raised. Absolute and relative paths are allowed, relative paths are resolved from cwd.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
If you'd like to share more information, please report an issue on GitHub
😔 What went wrong?