Methods ¶
close()
Closes the stream.
closed()
: → bool
True if the file is closed.
readable()
→ bool
Returns True if the stream can be read from (always False for FileWriter).
writable()
→ bool
Returns True if the stream is writeable.
flush()
Flushes underlying buffers.
seekable()
→ bool
Returns True if the stream is seekable (random access).
__enter__()
→ hou.fs.FileReader
Enters a scope in which the file writer will be closed on exit.
__exit__(type, value, traceback)
→ bool
Closes the file writer. Implicitly called at the end of a scope.
write(data)
→ int
Writes the given string or bytes, returns the file position after writing.
tell()
→ int
Returns current file position
seek(offset, whence = 0)
Move to new file position.
Argument offset
is a byte count.
Optional argument whence
defaults to 0 (offset from start of file, offset should be >= 0); other values are 1 (move relative to current position, positive or negative), and 2 (move relative to end of file, usually negative).
See also |