VCOM:VectorWorks:Filing:IRawOSFile
Jump to navigation
Jump to search
.SDK|SDK ..SDK:Types|SDK Types ..VCOM:VCOM (Vectorworks Component Object Model)|VCOM Basics ..VCOM:Class Reference|VCOM Class Reference
Description
namespace VectorWorks::Filing
Allows working with files in low level (manipulating by byte)
Interface
// ---------------------------------------------------------------------------------------------------- // {4F7F77DD-3796-11DB-9C35-00508D5E9851} static const VWIID IID_RawOSFile = { 0x4F7F77DD, 0x3796, 0x11DB, { 0x9C, 0x35, 0x00, 0x50, 0x8D, 0x5E, 0x98, 0x51 } }; class IRawOSFile : public IVWUnknown { public: virtual VCOMError VCOM_CALLTYPE Open(IFileIdentifier* pFileID, bool bReadable, bool bWritable, bool bRandomAccess, bool bTruncateExisting) = 0; virtual VCOMError VCOM_CALLTYPE Close() = 0; virtual VCOMError VCOM_CALLTYPE GetFileSize(Uint64& outValue) = 0; virtual VCOMError VCOM_CALLTYPE Read(Uint64 position, Uint64& inoutSize, void* pOutBuffer) = 0; virtual VCOMError VCOM_CALLTYPE Write(Uint64 position, Uint64 size, const void* pBuffer) = 0; };
Members
Open Opens a OS file with specified IFileIdentifier. Close Closes previosly opened file. GetFileSize Get file size. Read Read bytes from previosly opened for reading file. Write Writes bytes to previosly opened for writing file.
Remarks
In formation on using this interface at VCOM:Working with Binary or Text Files
There is predefined type for smart VCOM pointer VCOMPtr to IRawOSFile interface:
typedef VCOMPtr<IRawOSFile> IRawOSFilePtr;
Example
Samples at VCOM:Working with Binary or Text Files.
Version
Available from: VectorWorks 12
See Also
VCOM:VCOMPtr | VCOM:VectorWorks:Filing:IFolderIdentifier | VCOM:VectorWorks:Filing:IFileIdentifier
VCOM:Working with Binary or Text Files
[[VCOM:VCOMPtr]] | [[VCOM:VectorWorks:Filing:IFolderIdentifier]] | [[VCOM:VectorWorks:Filing:IFileIdentifier]]
[[VCOM:Working with Binary or Text Files]]