Functions¶
|
|
|
Details¶
- InfText.filesystem_format_read(storage, path, user_table, buffer)¶
- Parameters:
storage (
Infinityd.FilesystemStorage) – AInfinityd.FilesystemStorage.path (
str) – Storage path to retrieve the session from.user_table (
Infinity.UserTable) – An emptyInfinity.UserTableto use as the new session’s user table.buffer (
InfText.Buffer) – An emptyInfText.Bufferto use as the new session’s buffer.
- Raises:
- Returns:
- Return type:
Reads a text session from path in storage. The file is expected to have been saved with
InfText.filesystem_format_write() before. The user_table parameter should be an empty user table that will be used for the session, and the buffer parameter should be an emptyInfText.Buffer, and the document will be written into this buffer. If the function succeeds, the user table and buffer can be used to create anInfText.SessionwithInfText.Session.new_with_user_table(). If the function fails,Falseis returned and error is set.
- InfText.filesystem_format_write(storage, path, user_table, buffer)¶
- Parameters:
storage (
Infinityd.FilesystemStorage) – AInfinityd.FilesystemStorage.path (
str) – Storage path where to write the session to.user_table (
Infinity.UserTable) – TheInfinity.UserTableto write.buffer (
InfText.Buffer) – TheInfText.Bufferto write.
- Raises:
- Returns:
- Return type:
Writes the given user table and buffer into the filesystem storage at path. If successful, the session can then be read back with
InfText.filesystem_format_read(). If the function fails,Falseis returned and error is set.