#include <ramdisk.h>
A RamDisk provides a complete in-memory file system. It supports a Clone method to efficiently duplicate a whole file system.
公共成员函数 |
|
MAXON_METHOD Result < Url > | GetRoot () |
MAXON_METHOD Result < RamDiskRef > | Clone () const |
静态公共成员函数 |
|
static MAXON_METHOD Result < RamDiskInterface * > | Alloc ( MAXON_SOURCE_LOCATION_DECLARATION ) |
私有成员函数 |
|
MAXON_INTERFACE_NONVIRTUAL ( RamDiskInterface , MAXON_REFERENCE_NORMAL , "net.maxon.misc.interface.ramdisk") |
|
private |
|
static |
Creates a new empty RAM disk. The RAM disk will use a unique identifier for its root. As long as the RAM disk is alive, it can be found with a
Url
采用
ramdisk
scheme and the unique identifier as authority.
[in] | allocLocation | Pass MAXON_SOURCE_LOCATION(_NAME) to add the current source line and file. |
MAXON_METHOD Result < Url > GetRoot | ( | ) |
Returns the
Url
of the root directory of this RAM disk. The
Url
has the
ramdisk
scheme and uses the unique identifier of the RAM disk as authority. Also the returned
Url
contains a strong reference on this RAM disk, so it suffices to keep the
Url
alive to keep this RAM disk alive. Likewise all Urls which are derived from the returned
Url
will contain a strong reference.
MAXON_METHOD Result <RamDiskRef> Clone | ( | ) | const |
Returns a clone of this RAM disk. This is a cheap operation because as much as possible is shared between the original and the clone.