vibe.d beta banner
get vibe.d
0.10.0

Asynchronous I/O that doesn’t get in your way, written in D

Struct CachedFileStream

File backed cached random access stream wrapper.

struct CachedFileStream(InputStream)
  
if (isInputStream!InputStream);

Constructors

NameDescription
this (source, writable, cached_file_path)

Fields

NameTypeDescription
m_ctx CachedFileStream.CTX*

Properties

NameTypeDescription
dataAvailableForRead[get] bool
empty[get] bool
fd[get] int
isOpen[get] bool
leastSize[get] ulong
path[get] NativePath
readable[get] bool
size[get] ulong
writable[get] bool

Methods

NameDescription
close ()
finalize ()
flush ()
peek ()
read (dst, mode)
read (dst)
readUpTo (offset)
seek (offset)
tell ()
truncate (size)
write (bytes, mode)
write (bytes)
write (bytes)

Inner structs

NameDescription
CTX

See also

createCachedFileStream

Authors

Sönke Ludwig

Copyright

© 2023 Sönke Ludwig

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.