Storages & Files OpenSubStorage
OpenSubStorage method

A helper method that allows the application to open a storage in depth (i.e. not only direct descendants of the storage).


Set strm = object.OpenSubStorage( path [, SF_Flags])


path - relative path of the sub-storage. For example: "substorage1\substorage2\storagetoopen". See remarks.

SF_Flags - the standard SF flags.

returned value: the opened storage.


Set sf = Server.CreateObject("newObjects.utilctls.SFMain")
Set stg = sf.OpenStorageFile("C:\mystoragefile.stg")
Set strm = stg.OpenSubStorage("substorage\substorage_to_open")


This method is most likely useful for non-file system storages (OLE files or external implementations). It allows the application to open a storage directly by passing a string containing relative path to it in abstract notation. Of course the method can be used with every storage including directories.

path string - is abstract storage path very similar to the directory paths in the file system. The "\" or "/" delimiters can be used to separate the names of the storages in it. For example "a\b\c" will mean the item "c" in the storage "b" which is in turn in the storage "a". The virtual root is the storage whose member is called. 

Limitations: The basic features supported by all the storages cause some limitations - the path to the sub-item should be accessible which means no storage in the path must be locked for exclusive use in order method to work correctly. The method requires read access to all the storages specified in the path string.

Applies to: SFStorage object

newObjects Copyright 2001-2006 newObjects [ ]