vfs::VmoFile

Summary

Inheritance

Inherits from: vfs::internal::File

Constructors and Destructors

VmoFile(zx::vmo vmo, size_t length, WriteOption write_option, Sharing vmo_sharing)
~VmoFile()

Public types

Sharing{
  NONE,
  DUPLICATE,
  CLONE_COW
}
enum
WriteOption{
  READ_ONLY,
  WRITABLE
}
enum

Public functions

GetAttr(fuchsia::io::NodeAttributes *out_attributes) const override
zx_status_t
GetBackingMemory(fuchsia::io::VmoFlags flags, zx::vmo *out_vmo) override
zx_status_t
GetCapacity() override
size_t
GetLength() override
uint64_t
ReadAt(uint64_t count, uint64_t offset, std::vector< uint8_t > *out_data) override
zx_status_t
Truncate(uint64_t length) override
zx_status_t
WriteAt(std::vector< uint8_t > data, uint64_t offset, uint64_t *out_actual) override
zx_status_t

Protected functions

GetAllowedFlags() const override
fuchsia::io::OpenFlags

Public types

Sharing

 Sharing

WriteOption

 WriteOption

Public functions

GetAttr

zx_status_t GetAttr(
  fuchsia::io::NodeAttributes *out_attributes
) const override

GetBackingMemory

zx_status_t GetBackingMemory(
  fuchsia::io::VmoFlags flags,
  zx::vmo *out_vmo
) override

GetCapacity

size_t GetCapacity() override

GetLength

uint64_t GetLength() override

ReadAt

zx_status_t ReadAt(
  uint64_t count,
  uint64_t offset,
  std::vector< uint8_t > *out_data
) override

Truncate

zx_status_t Truncate(
  uint64_t length
) override

VmoFile

 VmoFile(
  zx::vmo vmo,
  size_t length,
  WriteOption write_option,
  Sharing vmo_sharing
)

WriteAt

zx_status_t WriteAt(
  std::vector< uint8_t > data,
  uint64_t offset,
  uint64_t *out_actual
) override

~VmoFile

 ~VmoFile() override

Protected functions

GetAllowedFlags

fuchsia::io::OpenFlags GetAllowedFlags() const override