File System API

Warning

Intended for internal used only

Simple File System API for Yotsuba 3

yotsuba.core.fs.mkdir(destpath)

Make directory with os.mkdir at destpath

Return true if no error is found during execution.

yotsuba.core.fs.read(filename='', mode='r')

Read file filename and return the content

Supported modes:

  • READ_NORMAL is to read as a text file using ‘r’ mode
  • READ_BINARY is to read as a binary file using ‘rb’ mode
  • READ_PICKLE is to read as a pickle file (serialized object) using ‘rb’ mode
yotsuba.core.fs.size(destpath)

Get the size of the content at destpath

yotsuba.core.fs.write(filename, data, mode='w')

Write the data to file filename

Supported modes:

  • WRITE_NORMAL is to write as a text file using ‘w’ mode
  • WRITE_BINARY is to write as a binary file using ‘wb’ mode
  • WRITE_PICKLE is to write as a pickle file (serialized object) using ‘wb’ mode

Previous topic

Base Module

Next topic

Fuoco Multi-threading Programming Framework

This Page