sio3pack.files ============== .. py:module:: sio3pack.files Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/sio3pack/files/remote_file/index Package Contents ---------------- .. py:class:: File(path) Base class for all files in a package. :param str path: The path to the file. .. py:method:: read() :abstractmethod: Read the file content. :return: The content of the file. .. py:method:: write(text) :abstractmethod: Write to the file. :param str text: The text to write. .. py:class:: LocalFile(path, exists=True) Bases: :py:obj:`sio3pack.files.file.File` Class for a file in a package that is stored locally. :param str path: The path to the file. :param str filename: The name of the file. .. py:method:: get_file_matching_extension(dir, filename, extensions) :classmethod: Get the file with the given filename and one of the given extensions. :param str dir: The directory to search in. :param str filename: The filename. :param list[str] extensions: The extensions. :return LocalFile: The file object. :raises FileNotFoundError: If no file is found. .. py:method:: read() Read the file content. :return: The content of the file. .. py:method:: write(text) Write to the file. :param str text: The text to write.