# MemoryDeviceFile

## Functions

| `MemoryDeviceFile`
| `~MemoryDeviceFile`
| `MemoryDeviceFile`
MemoryDeviceFile & | `operator=`
bool | `IsValid`
size_t | `Size`
size_t | `Read`
void | `SeekToBeginning`

## Detailed Description

class `MemoryDeviceFile`

  The MemoryDevice class is an in-memory virtual file used for sandboxing file IO. These objects can be obtained from a MemoryDevice object by calling `MemoryDevice::OpenFileForReading`.

  Public Functions

  `MemoryDeviceFile`()

    Creates an invalid memory device file.

  `~MemoryDeviceFile`()
  `MemoryDeviceFile`(MemoryDeviceFile &&source) = default

    Move construction. The source file will become invalid.

  MemoryDeviceFile &`operator=`(MemoryDeviceFile &&source) = default

    Move assignment. The source file will become invalid.

  inline bool `IsValid`() const

    Determines if this is a valid file object.

    Returns: | true if the file is valid, or false if it not. A moved-from file object will be invalid.

  size_t `Size`() const

    Query the size of the file.

    Returns: | The size, in bytes, of the given file.

  size_t `Read`(uint8_t *buffer, size_t num_bytes)

    Read bytes from the file

    Returns: | The number of bytes read.

  void `SeekToBeginning`()

    Resets the file such that the next Read operation will start at the beginning.

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your Docs generative AI assistant. Ask me anything about HOOPS Visualize Web or choose a sample question below to start a conversation:

What is HOOPS Visualize Web?
What are the latest release notes for HOOPS Visualize Web?
How do I start evaluating HOOPS Visualize Web?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...