# IMCLargeFile Struct Reference
[MCCore]

Inheritance diagram for IMCLargeFile:

List of all members.

## Public Member Functions
virtual MCErr MCCOMAPI | SetWithIMCFile (const IMCFile &aFile)=0
virtual MCErr MCCOMAPI | GetIMCFile (IMCFile **aFile)=0
virtual MCErr MCCOMAPI | GetSize (uint64 &length)=0
virtual MCErr MCCOMAPI | GetPosition (uint64 &mark)=0
virtual MCErr MCCOMAPI | Open ()=0
virtual MCErr MCCOMAPI | Close (void)=0
virtual MCErr MCCOMAPI | Flush (void)=0
virtual MCErr MCCOMAPI | Read (void *buffer, uint32 readAmount, uint32 *bytesRead=nil)=0
virtual MCErr MCCOMAPI | Write (const void *buffer, uint32 writeAmount, uint32 *bytesWritten=nil)=0
virtual MCErr MCCOMAPI | Seek (int64 distance, IMCFile::EFileSeekType startPoint)=0
virtual MCErr MCCOMAPI | SetEOF (uint64 newLength)=0

## Detailed Description

IMCLargeFile is the interface to access a file that can be larger than 2 Go.

To create an IMCLargeFile, use IShFileUtilities::CreateIMCLargeFile():

     TMCCountedPtr<IMCLargeFile> file;
     gFileUtilities->CreateIMCLargeFile(&file);

## Member Function Documentation

virtual MCErr MCCOMAPI IMCLargeFile::Close | ( | void |  | ) | `[pure virtual]`

Closes the file.

virtual MCErr MCCOMAPI IMCLargeFile::Flush | ( | void |  | ) | `[pure virtual]`

Writes all the data to the disk.

virtual MCErr MCCOMAPI IMCLargeFile::GetIMCFile | ( | IMCFile ** | aFile | ) | `[pure virtual]`

Creates an IMCFile with the same path name.

Parameters:

  | aFile | Returned file.

virtual MCErr MCCOMAPI IMCLargeFile::GetPosition | ( | uint64 & | mark | ) | `[pure virtual]`

Returns the current position in the file.

Parameters:

  | mark | The position.

virtual MCErr MCCOMAPI IMCLargeFile::GetSize | ( | uint64 & | length | ) | `[pure virtual]`

Returns the size of the file.

Parameters:

  | length | The size of the file.

virtual MCErr MCCOMAPI IMCLargeFile::Open | ( |  | ) | `[pure virtual]`

Opens a file using the permissions specified in SetPermissions

Note: When opening the file to write, the file size is not reset to 0. You need to call SetEOF for that purpose.

virtual MCErr MCCOMAPI IMCLargeFile::Read | ( | void * | buffer,
|  | uint32 | readAmount,
|  | uint32 * | bytesRead = `nil` |
| ) |  |  | `[pure virtual]`

virtual MCErr MCCOMAPI IMCLargeFile::Seek | ( | int64 | distance,
|  | IMCFile::EFileSeekType | startPoint |
| ) |  |  | `[pure virtual]`

virtual MCErr MCCOMAPI IMCLargeFile::SetEOF | ( | uint64 | newLength | ) | `[pure virtual]`

virtual MCErr MCCOMAPI IMCLargeFile::SetWithIMCFile | ( | const IMCFile & | aFile | ) | `[pure virtual]`

Sets the file path and permission from another file.

Parameters:

  | aFile | The file from which we get the path.

virtual MCErr MCCOMAPI IMCLargeFile::Write | ( | const void * | buffer,
|  | uint32 | writeAmount,
|  | uint32 * | bytesWritten = `nil` |
| ) |  |  | `[pure virtual]`

The documentation for this struct was generated from the following file:

- IMCLargeFile.h