summaryrefslogtreecommitdiff
path: root/docs/esp32
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2022-12-21 11:36:18 +1100
committerDamien George <damien@micropython.org>2023-01-13 16:38:34 +1100
commitaa64280666d40208ade0183503fe683fbb32c2ab (patch)
tree06ecd876a6443bbc7d48d8efea4e069b75c9dfad /docs/esp32
parent6013d27dd59dd111041f72106a5a5eddfb02a792 (diff)
tools/pyboard.py: Add fs_{listdir,readfile,writefile,stat}.
These are for working with the filesystem when using pyboard.py as a library, rather than at the command line. - fs_listdir returns a list of tuples, in the same format as os.ilistdir(). - fs_readfile returns the contents of a file as a bytes object. - fs_writefile allows writing a bytes object to a file. - fs_stat returns an os.statresult. All raise FileNotFoundError (or OSError(ENOENT) on Python 2) if the file is not found (or PyboardError on other errors). Updated fs_cp and fs_get to use fs_stat to compute file size. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'docs/esp32')
0 files changed, 0 insertions, 0 deletions