RandomAccessFileMixin mixin
class MyRandomAccessFile with RandomAccessFileMixin implements RandomAccessFile {
// Must override
@override
RandomAccessFile get randomAccessFile;
...
}
Methods
-
close()
→ Future<void>
-
Closes the file.
override
-
closeSync()
→ void
-
Synchronously closes the file.
override
-
flush()
→ Future<RandomAccessFile>
-
Flushes the contents of the file to disk.
override
-
flushSync()
→ void
-
Synchronously flushes the contents of the file to disk.
override
-
length()
→ Future<int>
-
Gets the length of the file.
override
-
lengthSync()
→ int
-
Synchronously gets the length of the file.
override
-
lock([FileLock mode = FileLock.exclusive, int start = 0, int end = -1])
→ Future<RandomAccessFile>
-
Locks the file or part of the file.
override
-
lockSync([FileLock mode = FileLock.exclusive, int start = 0, int end = -1])
→ void
-
Synchronously locks the file or part of the file.
override
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
position()
→ Future<int>
-
Gets the current byte position in the file.
override
-
positionSync()
→ int
-
Synchronously gets the current byte position in the file.
override
-
read(int count)
→ Future<Uint8List>
-
Reads up to
count
bytes from a file.
override
-
readByte()
→ Future<int>
-
Reads a byte from the file.
override
-
readByteSync()
→ int
-
Synchronously reads a single byte from the file.
override
-
readInto(List<int> buffer, [int start = 0, int? end])
→ Future<int>
-
Reads bytes into an existing
buffer
.
override
-
readIntoSync(List<int> buffer, [int start = 0, int? end])
→ int
-
Synchronously reads into an existing
buffer
.
override
-
readSync(int count)
→ Uint8List
-
Synchronously reads up to
count
bytes from a file
override
-
setPosition(int position)
→ Future<RandomAccessFile>
-
Sets the byte position in the file.
override
-
setPositionSync(int position)
→ void
-
Synchronously sets the byte position in the file.
override
-
toString()
→ String
-
A string representation of this object.
override
-
truncate(int length)
→ Future<RandomAccessFile>
-
Truncates (or extends) the file to
length
bytes.
override
-
truncateSync(int length)
→ void
-
Synchronously truncates (or extends) the file to
length
bytes.
override
-
unlock([int start = 0, int end = -1])
→ Future<RandomAccessFile>
-
Unlocks the file or part of the file.
override
-
unlockSync([int start = 0, int end = -1])
→ void
-
Synchronously unlocks the file or part of the file.
override
-
writeByte(int value)
→ Future<RandomAccessFile>
-
Writes a single byte to the file.
override
-
writeByteSync(int value)
→ int
-
Synchronously writes a single byte to the file.
override
-
writeFrom(List<int> buffer, [int start = 0, int? end])
→ Future<RandomAccessFile>
-
Writes from a
buffer
to the file.
override
-
writeFromSync(List<int> buffer, [int start = 0, int? end])
→ void
-
Synchronously writes from a
buffer
to the file.
override
-
writeString(String string, {Encoding encoding = utf8})
→ Future<RandomAccessFile>
-
Writes a string to the file using the given Encoding.
override
-
writeStringSync(String string, {Encoding encoding = utf8})
→ void
-
Synchronously writes a single string to the file using the given
Encoding.
override