Structured storage compound storage object
This object acts as an iterator through PyIStorage::EnumElements
-
Creates and opens a stream object with the specified name contained in this storage object.
-
Opens an existing stream object.
-
Creates and opens a new storage object nested within this storage object.
-
Opens an existing storage object with the specified name in the specified access mode.
-
Copies the entire contents of an open storage object to another storage object.
-
Copies or moves a substorage or stream from this storage object to another storage object.
-
Ensures that any changes made to a storage object open in transacted mode are reflected in the parent storage.
-
Discards all changes that have been made to the storage object since the last commit.
-
Retrieves an enumerator object that can be used to enumerate the storage and stream objects contained within this storage object.
-
Removes the specified storage or stream from this storage object.
-
Renames the specified substorage or stream in this storage object.
-
Sets the modification, access, and creation times of the specified storage element, if supported by the underlying file system.
-
Assigns the specified CLSID to this storage object.
-
Stores up to 32 bits of state information in this storage object.
-
Retrieves the STATSTG structure for this open storage object.
PyIStorage.Commit
Commit(grfCommitFlags) Ensures that any changes made to a storage object open in transacted mode are reflected in the parent storage;
for a root storage, reflects the changes in the actual device, for example, a file on disk.
For a root storage object opened in direct mode, this method has no effect except to flush all memory buffers to the disk. For non-root storage objects in direct mode, this method has no effect.
-
grfCommitFlags : int
Controls how the changes are committed to the storage object. See the STGC enumeration for a definition of these values.
PyIStorage.CopyTo
CopyTo(rgiidExclude, snbExclude, stgDest) Copies the entire contents of an open storage object to another storage object.
-
rgiidExclude : [PyIID,]
List of IID's to be excluded. Use empty seq to exclude all objects, or None to indicate no excludes.
-
snbExclude : SNB
Reserved for later - Must be None
-
stgDest : PyIStorage
The open storage object into which this storage object is to be copied.
The destination storage object can be a different implementation of the PyIStorage interface from the source storage object.
Thus, IStorage::CopyTo
can only use publicly available methods of the destination storage object.
If stgDest is open in transacted mode, it can be reverted by calling its PyIStorage::Revert method.
PyIStorage.CreateStorage
PyIStorage = CreateStorage(Name, Mode
, StgFmt
, reserved2
) Creates and opens a new storage object nested within this storage object.
-
Name : str
The name of the newly created stream.
-
Mode : int
Access mode - combination of storagecon.STGM_* flags
-
StgFmt : int
Documented as "reserved"!
-
reserved2=0 : int
Description for reserved2
PyIStorage.CreateStream
PyIStream = CreateStream(Name, Mode
, reserved1
, reserved2
) Creates and opens a stream object with the specified name contained in this storage object. All elements within a storage object — both streams and other storage objects — are kept in the same name space.
-
Name : str
Name of the new stream
-
Mode : int
Access mode, storagecon.STGM_*
-
reserved1=0 : int
Reserved - must be zero.
-
reserved2=0 : int
Reserved - must be zero.
PyIStorage.DestroyElement
DestroyElement(name) Removes the specified storage or stream from this storage object.
-
name : string
The name of the element to be removed.
PyIStorage.EnumElements
PyIEnumSTATSTG = EnumElements(reserved1, reserved2
, reserved3
) Retrieves an enumerator object that can be used to enumerate the storage and stream objects contained within this storage object.
-
reserved1=0 : int
Reserved - must be zero.
-
reserved2=None : object
A reserved param. Always pass None. NULL is always passed to the COM function
-
reserved3=0 : int
Reserved - must be zero.
PyIStorage.MoveElementTo
MoveElementTo(Name, stgDest, NewName, Flags) Copies or moves a substorage or stream from this storage object to another storage object.
-
Name : str
A string that contains the name of the element in this storage object to be moved or copied.
-
stgDest : PyIStorage
PyIStorage for the destination storage object.
-
NewName : str
A string that contains the new name for the element in its new storage object.
-
Flags : int
Specifies whether to move or copy (storagecon.STGMOVE_MOVE or STGMOVE_COPY)
PyIStorage.OpenStorage
PyIStorage = OpenStorage(Name, Priority
, Mode
, snbExclude
, reserved
) Opens an existing storage object with the specified name in the specified access mode.
-
Name : str
Name of the storage, or None.
-
Priority : PyIStorage
If the pstgPriority parameter is not None, it is a PyIStorage object to a previous opening of an element of the storage object,
usually one that was opened in priority mode. The storage object should be closed and re-opened
according to grfMode. When the PyIStorage::OpenStorage method returns, pstgPriority is no longer valid - use the result value.
If the pstgPriority parameter is None, it is ignored.
-
Mode : int
Access mode - combination of storagecon.STGM_* flags (must include STGM_SHARE_EXCLUSIVE)
-
snbExclude : SNB
Reserved for later - Must be None
-
reserved=0 : int
Reserved integer param.
PyIStorage.OpenStream
PyIStream = OpenStream(Name, reserved1
, Mode
, reserved2
) Opens an existing stream object within this storage object in the specified access mode.
-
Name : str
Name of stream to be opened
-
reserved1 : object
A reserved param. Always pass None. NULL is always passed to the COM function
-
Mode : int
Access mode, storagecon.STGM_*
-
reserved2=0 : int
Reserved - must be zero.
PyIStorage.RenameElement
RenameElement(OldName, NewName) Renames the specified substorage or stream in this storage object.
-
OldName : str
The name of the substorage or stream to be changed.
-
NewName : str
The new name for the specified sustorage or stream.
PyIStorage.Revert
Revert() Discards all changes that have been made to the storage object since the last commit.
PyIStorage.SetClass
SetClass(clsid) Assigns the specified CLSID to this storage object.
-
clsid : PyIID
The class identifier (CLSID) that is to be associated with the storage object.
PyIStorage.SetElementTimes
SetElementTimes(name, ctime, atime, mtime) Sets the modification, access, and creation times of the specified storage element, if supported by the underlying file system.
-
name : str
The name of the storage object element whose times are to be modified. If NULL, the time is set on the root storage rather than one of its elements.
-
ctime : PyTime
Either the new creation time for the element or None if the creation time is not to be modified.
-
atime : PyTime
Either the new access time for the element or None if the access time is not to be modified.
-
mtime : PyTime
Either the new modification time for the element or None if the modification time is not to be modified.
PyIStorage.SetStateBits
SetStateBits(grfStateBits, grfMask) Stores up to 32 bits of state information in this storage object.
-
grfStateBits : int
Specifies the new values of the bits to set. No legal values are defined for these bits; they are all reserved for future use and must not be used by applications.
-
grfMask : int
A binary mask indicating which bits in grfStateBits are significant in this call.
PyIStorage.Stat
STATSTG = Stat(grfStatFlag) Retrieves the STATSTG structure for this open storage object.
-
grfStatFlag : int
Specifies that some of the fields in the STATSTG structure are not returned, thus saving a memory allocation operation. Values are taken from the STATFLAG enumeration.