pc.files works on the computer’s filesystem. A path is absolute, may use environment variables such as %USERPROFILE%, and a relative path is taken from the user’s home folder.
pc.files.write_text("Documents\\todo.txt", "buy milk\n")
print(pc.files.read_text("%USERPROFILE%\\Documents\\todo.txt"))
pc.files.download("Documents\\todo.txt", "todo.txt")
A read or write is at most 32 MiB. C:\ax holds the session’s own software and is read-only, except C:\ax\downloads.

files.read_bytes() and files.read_text()

files.read_bytes(path)                    # -> bytes
files.read_text(path, encoding="utf-8")   # -> str
Raises TargetNotFoundError when the file doesn’t exist; InvalidArgsError for a folder or a file over 32 MiB.

files.write_bytes() and files.write_text()

Write a file, creating its folders. With append=True, add to the end instead of replacing it.
files.write_bytes(path, data, *, append=False)
files.write_text(path, text, *, encoding="utf-8", append=False)
Returns FileInfo for the written file. Raises InvalidArgsError for a path under C:\ax other than C:\ax\downloads, or over 32 MiB.

files.upload() and files.download()

Copy a local file onto the computer, or a file from the computer to a local path.
files.upload(local_path, remote_path)     # -> FileInfo
files.download(remote_path, local_path)

files.list()

A folder’s entries, at most 10,000.
files.list(path)
Returns list[FileInfo].

files.stat() and files.exists()

files.stat(path)      # -> FileInfo
files.exists(path)    # -> bool
stat raises TargetNotFoundError when nothing is there; exists returns False.

files.mkdir()

Create a folder and any missing parents.
files.mkdir(path)
Returns FileInfo.

files.delete()

Delete a file or folder. A folder that isn’t empty needs recursive=True.
files.delete(path, *, recursive=False)

FileInfo

FieldTypeDescription
namestrThe file or folder name.
pathstrIts full path.
is_dirboolWhether it is a folder.
sizeintSize in bytes.
modified_msintLast modified, epoch milliseconds.