Skip to content

stream

FreeBodyEngine.core.files.stream #

FileStream #

Base class for a FileSystem backend's raw byte-level IO (DevFileStream for a real file on disk, AssetPackStream for a read-only view into a bundled .pak) - every method here is a no-op stub, meant to be overridden; the default (write-nothing, read-nothing) FileStream is itself used as a placeholder for a resource with no real backing data (see AssetPackFileSystem.get_file()'s atlas-region case).

clear() #

Clears all bytes from a file.

read(size=-1, offset=0) #

Reads bytes from the IO stream.

remove(start, end) #

Removes bytes within a range

write(data, offset=0) #

Writes bytes to the IO stream.