-
Notifications
You must be signed in to change notification settings - Fork 0
py api docs
Ccode-lang edited this page Aug 31, 2021
·
5 revisions
The docs are made to make file operations easier. Currently, the api is not developed enough to make many docs.
The drumver function is used to get the drum API version installed on the system.
import api
print(api.drumver())
Output (may vary):
drum bash py api 0.0.1
The createfile() function is used to create files in the current directory.
It returns an integer error code.
error = api.file.create("test")
print(str(error))
Output:
0
The filecheck() function is used to see if a file exists. It returns a bool value.
exists = api.file.check("test")
if exists:
print("file test exists")
else:
print("file test does not exist")
Output if it exists:
file test exists
Output if it does not exist:
file test does not exist