Writes p.byteLength
bytes from p
to the underlying data
stream. It resolves to the number of bytes written from p
(0
<= n
<=
p.byteLength
) and any error encountered that caused the write to stop
early. write()
must return a non-null error if it returns n
<
p.byteLength
. write() must not modify the slice data, even temporarily.
Implementations must not retain p
.
Generated using TypeDoc
Seek sets the offset for the next
read()
orwrite()
to offset, interpreted according towhence
:SeekStart
means relative to the start of the file,SeekCurrent
means relative to the current offset, andSeekEnd
means relative to the end. Seek returns the new offset relative to the start of the file and an error, if any.Seeking to an offset before the start of the file is an error. Seeking to any positive offset is legal, but the behavior of subsequent I/O operations on the underlying object is implementation-dependent.