VirtualBox Main API
Public Member Functions | Public Attributes | List of all members
IFile Interface Reference

Abstract parent interface for files handled by VirtualBox. More...

Inheritance diagram for IFile:
IGuestFile

Public Member Functions

void close ()
 Closes this file.
void queryInfo ([retval] out IFsObjInfo objInfo)
 Queries information about this file.
void read (in unsigned long toRead, in unsigned long timeoutMS,[retval] out octet[] data)
 Reads data from this file.
void readAt (in long long offset, in unsigned long toRead, in unsigned long timeoutMS,[retval] out octet[] data)
 Reads data from an offset of this file.
void seek (in long long offset, in FileSeekType whence)
 Changes the read and write position of this file.
void setACL (in wstring acl)
 Sets the ACL of this file.
void write (in octet[] data, in unsigned long timeoutMS,[retval] out unsigned long written)
 Writes bytes to this file.
void writeAt (in long long offset, in octet[] data, in unsigned long timeoutMS,[retval] out unsigned long written)
 Writes bytes at a certain offset to this file.

Public Attributes

readonly attribute unsigned long creationMode
 The creation mode.
readonly attribute wstring disposition
 The disposition mode.
readonly attribute IEventSource eventSource
 Event source for guest session events.
readonly attribute wstring fileName
 Full path of the actual file name of this file.
readonly attribute unsigned long id
 The file's ID.
readonly attribute long long initialSize
 The initial size in bytes when opened.
readonly attribute wstring openMode
 The open mode.
readonly attribute long long offset
 Current read/write offset in bytes.
readonly attribute FileStatus status
 Current file status.

Detailed Description

Abstract parent interface for files handled by VirtualBox.

Interface ID:
{5EC56EA3-B55D-4BDB-8C4F-5F9FB26B894B}

Member Function Documentation

void IFile::close ( )

Closes this file.

After closing operations like reading data, writing data or querying information will not be possible anymore.

void IFile::queryInfo ( [retval] out IFsObjInfo  objInfo)

Queries information about this file.

Parameters
objInfoObject information of this file. Also see IFsObjInfo.
Expected result codes:
E_NOTIMPL The method is not implemented yet.
void IFile::read ( in unsigned long  toRead,
in unsigned long  timeoutMS,
[retval] out octet[]  data 
)

Reads data from this file.

Parameters
toReadNumber of bytes to read.
timeoutMSTimeout (in ms) to wait for the operation to complete. Pass 0 for an infinite timeout.
dataArray of data read.
  @par Expected result codes:
<table><tr>

E_NOTIMPL

The method is not implemented yet.

void IFile::readAt ( in long long  offset,
in unsigned long  toRead,
in unsigned long  timeoutMS,
[retval] out octet[]  data 
)

Reads data from an offset of this file.

Parameters
offsetOffset in bytes to start reading.
toReadNumber of bytes to read.
timeoutMSTimeout (in ms) to wait for the operation to complete. Pass 0 for an infinite timeout.
dataArray of data read.
  @par Expected result codes:
<table><tr>

E_NOTIMPL

The method is not implemented yet.

void IFile::seek ( in long long  offset,
in FileSeekType  whence 
)

Changes the read and write position of this file.

Parameters
offsetOffset to seek.
whenceSeek mode; see FileSeekType for more information.
Expected result codes:
E_NOTIMPL The method is not implemented yet.
void IFile::setACL ( in wstring  acl)

Sets the ACL of this file.

Parameters
aclACL string to set.
  @par Expected result codes:
<table><tr>

E_NOTIMPL

The method is not implemented yet.

void IFile::write ( in octet[]  data,
in unsigned long  timeoutMS,
[retval] out unsigned long  written 
)

Writes bytes to this file.

Parameters
dataArray of bytes to write. The size of the array also specifies how much to write.
timeoutMSTimeout (in ms) to wait for the operation to complete. Pass 0 for an infinite timeout.
writtenHow much bytes were written.
void IFile::writeAt ( in long long  offset,
in octet[]  data,
in unsigned long  timeoutMS,
[retval] out unsigned long  written 
)

Writes bytes at a certain offset to this file.

Parameters
offsetOffset in bytes to start writing.
dataArray of bytes to write. The size of the array also specifies how much to write.
timeoutMSTimeout (in ms) to wait for the operation to complete. Pass 0 for an infinite timeout.
writtenHow much bytes were written.
  @par Expected result codes:
<table><tr>

E_NOTIMPL

The method is not implemented yet.

Member Data Documentation

readonly attribute unsigned long IFile::creationMode

The creation mode.

readonly attribute wstring IFile::disposition

The disposition mode.

readonly attribute IEventSource IFile::eventSource

Event source for guest session events.

readonly attribute wstring IFile::fileName

Full path of the actual file name of this file.

readonly attribute unsigned long IFile::id

The file's ID.

readonly attribute long long IFile::initialSize

The initial size in bytes when opened.

readonly attribute wstring IFile::openMode

The open mode.

readonly attribute long long IFile::offset

Current read/write offset in bytes.

readonly attribute FileStatus IFile::status

Current file status.