:py:mod:`vspyx.IO` ================== .. py:module:: vspyx.IO Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: vspyx.IO.BufferedInputStream vspyx.IO.FileInputStream vspyx.IO.FileOutputStream vspyx.IO.FileStream vspyx.IO.Filesystem vspyx.IO.InputOutputStream vspyx.IO.InputStream vspyx.IO.MemoryInputOutputStream vspyx.IO.MemoryMappedFile vspyx.IO.Mode vspyx.IO.Module vspyx.IO.OutputStream vspyx.IO.SeekableInputOutputStream vspyx.IO.SeekableInputStream vspyx.IO.SeekableInputSubstream vspyx.IO.SeekableOutputStream vspyx.IO.SeekableOutputSubstream vspyx.IO.SeekableStream vspyx.IO.Stream vspyx.IO.TextReader vspyx.IO.ZstdOutputStream .. py:class:: BufferedInputStream Bases: :py:obj:`SeekableInputStream` .. autoapi-inheritance-diagram:: vspyx.IO.BufferedInputStream :parts: 1 :private-bases: BufferedInputStream .. py:class:: FileInputStream Bases: :py:obj:`FileStream`, :py:obj:`SeekableInputStream` .. autoapi-inheritance-diagram:: vspyx.IO.FileInputStream :parts: 1 :private-bases: FileInputStream .. py:class:: FileOutputStream Bases: :py:obj:`FileStream`, :py:obj:`SeekableOutputStream` .. autoapi-inheritance-diagram:: vspyx.IO.FileOutputStream :parts: 1 :private-bases: FileOutputStream .. py:class:: FileStream Bases: :py:obj:`Stream` .. autoapi-inheritance-diagram:: vspyx.IO.FileStream :parts: 1 :private-bases: FileStream .. py:attribute:: FilePath :annotation: :str .. py:attribute:: Size :annotation: :int .. py:attribute:: UnixModifiedTime :annotation: :int .. py:class:: Filesystem Bases: :py:obj:`vspyx.Core.Object` .. autoapi-inheritance-diagram:: vspyx.IO.Filesystem :parts: 1 :private-bases: Filesystem .. py:method:: AbsolutePath(self, path: str) -> str .. py:method:: CanonicalPath(self, path: str) -> str .. py:method:: CombinePaths(self, path1: str, path2: str) -> str .. py:method:: ComparePaths(self, path1: str, path2: str) -> int .. py:method:: DirectoryExists(self, path: str) -> bool .. py:method:: EnumerateDirectory(self, path: str) -> List[str] .. py:method:: FileExists(self, path: str) -> bool .. py:method:: GetExtensionOfPath(self, path: str) -> str .. py:method:: GetFilenameOfPath(self, path: str) -> str .. py:method:: GetNumericAttribute(self, path: str, key: str) -> vspyx.Core.Numeric .. py:method:: GetParentPathOfPath(self, path: str) -> str .. py:method:: GetRootDirectoryOfPath(self, path: str) -> str .. py:method:: GetRootNameOfPath(self, path: str) -> str .. py:method:: GetRootPathOfPath(self, path: str) -> str .. py:method:: GetStemOfPath(self, path: str) -> str .. py:method:: GetStringAttribute(self, path: str, key: str) -> str .. py:method:: MakeDirectory(self, path: str) -> Any .. py:method:: OpenFileForRead(self, path: str) -> FileInputStream .. py:method:: OpenFileForWrite(self, path: str) -> FileOutputStream .. py:method:: OpenMemoryMappedFile(self, path: str, writable: bool) -> MemoryMappedFile OpenMemoryMappedFile(self, path: str, writable: bool, writableFileSize: Any) -> MemoryMappedFile .. py:method:: PathIsAbsolute(self, path: str) -> bool .. py:method:: PathIsRelative(self, path: str) -> bool .. py:method:: RelativePath(self, relativeFrom: str, path: str) -> str .. py:method:: Remove(self, path: str) -> Any .. py:method:: RemoveAll(self, path: str) -> Any .. py:method:: SetNumericAttribute(self, path: str, key: str, value: vspyx.Core.Numeric) -> Any .. py:method:: SetStringAttribute(self, path: str, key: str, value: str) -> Any .. py:method:: SystemAbsolutePath(self, path: str) -> str .. py:class:: InputOutputStream Bases: :py:obj:`InputStream`, :py:obj:`OutputStream` .. autoapi-inheritance-diagram:: vspyx.IO.InputOutputStream :parts: 1 :private-bases: InputOutputStream .. py:class:: InputStream Bases: :py:obj:`Stream` .. autoapi-inheritance-diagram:: vspyx.IO.InputStream :parts: 1 :private-bases: InputStream .. py:attribute:: AvailableBytes :annotation: :int .. py:method:: Read(self, buffer: Any, len: int) -> int .. py:class:: MemoryInputOutputStream Bases: :py:obj:`SeekableInputStream`, :py:obj:`SeekableOutputStream` .. autoapi-inheritance-diagram:: vspyx.IO.MemoryInputOutputStream :parts: 1 :private-bases: MemoryInputOutputStream .. py:class:: MemoryMappedFile Bases: :py:obj:`FileStream` .. autoapi-inheritance-diagram:: vspyx.IO.MemoryMappedFile :parts: 1 :private-bases: MemoryMappedFile .. py:method:: GetView(self, offset: int, size: int) -> vspyx.Core.BytesView .. py:class:: Mode Bases: :py:obj:`enum.IntEnum` .. autoapi-inheritance-diagram:: vspyx.IO.Mode :parts: 1 :private-bases: Enum where members are also (and must be) ints .. py:attribute:: Append :annotation: = 2 .. py:attribute:: Read :annotation: = 0 .. py:attribute:: UpdateAppend :annotation: = 5 .. py:attribute:: UpdateRead :annotation: = 3 .. py:attribute:: UpdateWrite :annotation: = 4 .. py:attribute:: Write :annotation: = 1 .. py:class:: Module Bases: :py:obj:`vspyx.Core.Module` .. autoapi-inheritance-diagram:: vspyx.IO.Module :parts: 1 :private-bases: Module .. py:attribute:: AppDataFilesystem :annotation: :Filesystem .. py:attribute:: AppDataFilesystemRoot :annotation: :str .. py:attribute:: BuiltInFilesystem :annotation: :Filesystem .. py:attribute:: BuiltInFilesystemIsOSFilesystem :annotation: :bool .. py:attribute:: BuiltInFilesystemRoot :annotation: :str .. py:attribute:: OSFilesystem :annotation: :Filesystem .. py:attribute:: SetupFilesystem :annotation: :Filesystem .. py:attribute:: UserFilesystem :annotation: :Filesystem .. py:attribute:: UserFilesystemRoot :annotation: :str .. py:method:: NewChrootFilesystem(self, systemPath: str) -> Filesystem .. py:method:: NewTemporaryFilesystem(self) -> Filesystem .. py:method:: OpenFileForRead(self, path: str) -> FileInputStream .. py:method:: OpenFileForWrite(self, path: str) -> FileOutputStream .. py:method:: OpenMemoryMappedFile(self, path: str, writable: bool) -> MemoryMappedFile OpenMemoryMappedFile(self, path: str, writable: bool, writableFileSize: Any) -> MemoryMappedFile .. py:method:: SetAppDataFilesystemRootOverride(path: str) -> Any :staticmethod: .. py:method:: SetBuiltInFilesystemRootOverride(path: str) -> Any :staticmethod: .. py:method:: SetUserFilesystemRootOverride(path: str) -> Any :staticmethod: .. py:class:: OutputStream Bases: :py:obj:`Stream` .. autoapi-inheritance-diagram:: vspyx.IO.OutputStream :parts: 1 :private-bases: OutputStream .. py:method:: Flush(self) -> Any .. py:method:: Write(self, buffer: Any, len: int) -> int .. py:class:: SeekableInputOutputStream Bases: :py:obj:`FileInputStream`, :py:obj:`FileOutputStream` .. autoapi-inheritance-diagram:: vspyx.IO.SeekableInputOutputStream :parts: 1 :private-bases: SeekableInputOutputStream .. py:class:: SeekableInputStream Bases: :py:obj:`InputStream`, :py:obj:`SeekableStream` .. autoapi-inheritance-diagram:: vspyx.IO.SeekableInputStream :parts: 1 :private-bases: SeekableInputStream .. py:class:: SeekableInputSubstream Bases: :py:obj:`FileInputStream` .. autoapi-inheritance-diagram:: vspyx.IO.SeekableInputSubstream :parts: 1 :private-bases: SeekableInputSubstream .. py:attribute:: AvailableBytes :annotation: :int .. py:attribute:: FilePath :annotation: :str .. py:attribute:: IsClosed :annotation: :bool .. py:attribute:: Position :annotation: :int .. py:attribute:: Size :annotation: :int .. py:attribute:: UnixModifiedTime :annotation: :int .. py:method:: Clone(self) -> Any .. py:method:: Close(self) -> Any .. py:method:: Read(self, buffer: Any, len: int) -> int .. py:method:: Seek(self, offset: int, origin: int) -> Any .. py:class:: SeekableOutputStream Bases: :py:obj:`OutputStream`, :py:obj:`SeekableStream` .. autoapi-inheritance-diagram:: vspyx.IO.SeekableOutputStream :parts: 1 :private-bases: SeekableOutputStream .. py:class:: SeekableOutputSubstream Bases: :py:obj:`FileOutputStream` .. autoapi-inheritance-diagram:: vspyx.IO.SeekableOutputSubstream :parts: 1 :private-bases: SeekableOutputSubstream .. py:attribute:: FilePath :annotation: :str .. py:attribute:: IsClosed :annotation: :bool .. py:attribute:: Position :annotation: :int .. py:attribute:: Size :annotation: :int .. py:attribute:: UnixModifiedTime :annotation: :int .. py:method:: Clone(self) -> Any .. py:method:: Close(self) -> Any .. py:method:: Flush(self) -> Any .. py:method:: Seek(self, offset: int, origin: int) -> Any .. py:method:: Write(self, buffer: Any, len: int) -> int .. py:class:: SeekableStream Bases: :py:obj:`Stream` .. autoapi-inheritance-diagram:: vspyx.IO.SeekableStream :parts: 1 :private-bases: SeekableStream .. py:attribute:: Position :annotation: :int .. py:method:: Seek(self, offset: int, origin: int) -> Any .. py:class:: Stream Stream .. py:attribute:: IsClosed :annotation: :bool .. py:method:: Clone(self) -> Any .. py:method:: Close(self) -> Any .. py:method:: assign(self, arg0: Stream) -> Stream .. py:class:: TextReader Bases: :py:obj:`vspyx.Core.Object` .. autoapi-inheritance-diagram:: vspyx.IO.TextReader :parts: 1 :private-bases: TextReader .. py:class:: Encoding Bases: :py:obj:`enum.IntEnum` .. autoapi-inheritance-diagram:: vspyx.IO.TextReader.Encoding :parts: 1 :private-bases: Enum where members are also (and must be) ints .. py:attribute:: UTF16_BIG_ENDIAN :annotation: = 2 .. py:attribute:: UTF16_LITTLE_ENDIAN :annotation: = 1 .. py:attribute:: UTF32_BIG_ENDIAN :annotation: = 4 .. py:attribute:: UTF32_LITTLE_ENDIAN :annotation: = 3 .. py:attribute:: UTF8 :annotation: = 0 .. py:attribute:: LastReadLine :annotation: :str .. py:method:: New(source: SeekableInputStream) -> TextReader New(source: InputStream, encoding: TextReader.Encoding) -> TextReader :staticmethod: Create a new TextReader with the specified encoding .. py:method:: ReadNextLineIfAvailable(self) -> bool .. py:class:: ZstdOutputStream Bases: :py:obj:`OutputStream` .. autoapi-inheritance-diagram:: vspyx.IO.ZstdOutputStream :parts: 1 :private-bases: ZstdOutputStream .. py:method:: InputBufferSize() -> int :staticmethod: .. py:method:: OutputBufferSize() -> int :staticmethod: .. py:method:: SetCompressionLevel(self, level: int) -> Any