This interface is implemented by components that represent files within the plugin’s file system. It augments the properties and methods provided by the IFileSystemItem interface, which should also be implemented by the component.
Properties
Sizeread-onlyIFile
The lower 32 bits of the file’s size.
IDL |
[propget] HRESULT Size([out, retval] unsigned long* pValue)
|
---|---|
.NET | UInt32 Size[get] |
SizeHighread-onlyIFile
The upper 32 bits of the file’s size.
IDL |
[propget] HRESULT SizeHigh([out, retval] unsigned long* pValue)
|
---|---|
.NET | UInt32 SizeHigh[get] |
Methods
OpenIFile
This method should open the file with the specified access and return a stream that can be used to read from and/or write to the file. Merge assumes that the file is opened in binary mode and does not make any assumptions about line ending character transformations (if any) performed by the stream.
IDL |
HRESULT Open(
|
---|---|
.NET | IFileStream Open( |
dwDesiredAccess
Specifies the type of access (read/write) that is required. Valid values are those listed for thedwDesiredAccess
argument to the Win32CreateFile
API:Value Meaning GENERIC_READ (0x80000000L) Specifies read access to the file. Can be combined (bitwise OR) with GENERIC_WRITE to obtain read/write access. GENERIC_WRITE (0x40000000L) Specifies write access to the file. Can be combined (bitwise OR) with GENERIC_READ to obtain read/write access. dwCreationDisposition
Specifies how a file should be created or trunctated if it is being opened for write access. Valid values are those listed for thedwCreationDisposition
argument to the Win32CreateFile
API:Value Meaning CREATE_NEW (1) Specifies that the file is to be created and the operation should fail if the file already exists. CREATE_ALWAYS (2) Specifies that the file is to be created and any existing file should be replaced with an empty file ready for writing. OPEN_EXISTING (3) Specifies that the file is to be opened and that the operation should fail if the file does not exist. OPEN_ALWAYS (4) Specifies that the file is to be opened for writing at the start of the file. If the file does not already exist, a new empty file should be created as for CREATE_NEW. TRUNCATE_EXISTING (5) Specifies that the file is to be opened for writing and truncated to zero length. The operation should fail if the file does not already exist.