VCOM:VectorWorks:Filing:IApplicationFolders

From Vectorworks Developer
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

This class provides an interface to "merged" standard folders as defined in Task 379. When loading standard content, rather than only looking underneath the application folder, systems should now look in the "full search path", which includes (in order):

  1. The User Data and Preferences folder
  2. The Workgroup folder(s)
  3. The Application folder

These folders (except for the App folder) are selected by the user in the VectorWorks preferences dialog. All code must assume that only the [User] root is writable.

Interface

// ----------------------------------------------------------------------------------------------------
// {CAFEFEEB-3793-11DB-9C35-00508D5E9851}
static const VWIID IID_ApplicationFolders = { 0xCAFEFEEB, 0x3793, 0x11DB, { 0x9C, 0x35, 0x00, 0x50, 0x8D, 0x5E, 0x98, 0x51 } };

class IApplicationFolders : public IVWUnknown
{
public:
  virtual VCOMError VCOM_CALLTYPE ForEachFileInStandardFolder(IFolderContentListener* pVisitor, EFolderSpecifier folderSpec) = 0;
  virtual VCOMError VCOM_CALLTYPE ForEachFolderInStandardFolderClass(IFolderContentListener* pVisitor, EFolderSpecifier folderSpec) = 0;
  virtual VCOMError VCOM_CALLTYPE ForEachWorkspaceFileWithDuplicates(IWorkspaceFileInfoListener* pVisitor) = 0;
  virtual VCOMError VCOM_CALLTYPE FindFileInStandardFolder(EFolderSpecifier folderSpec, const TXString& fileName, IFileIdentifier** outFileID) = 0;
  virtual VCOMError VCOM_CALLTYPE FindFileInStandardFolder(EFolderSpecifier folderSpec, const TXString& fileName, const TXString& extension, IFileIdentifier** outFileID) = 0;
  virtual VCOMError VCOM_CALLTYPE GetFileInUserRoot(EFolderSpecifier folderSpec, const TXString& fileName, IFileIdentifier** outFileID) = 0;
  virtual VCOMError VCOM_CALLTYPE GetNumFilesInStandardFolder(EFolderSpecifier folderSpec, size_t& outNumberFiles) = 0;
  virtual VCOMError VCOM_CALLTYPE GetStandardFolderInUserRoot(EFolderSpecifier folderSpec, IFolderIdentifier** outFolderID) = 0;
  virtual VCOMError VCOM_CALLTYPE GetStandardFolderInAppRoot(EFolderSpecifier folderSpec, IFolderIdentifier** outFolderID) = 0;
  virtual VCOMError VCOM_CALLTYPE GetApplicationFolder(IFolderIdentifier** outFolderID) = 0;
  virtual VCOMError VCOM_CALLTYPE GetUserFolder(IFolderIdentifier** outFolderID) = 0;
  virtual VCOMError VCOM_CALLTYPE ClearStandardFolderCache(EFolderSpecifier folderSpec) = 0;

  virtual VCOMError VCOM_CALLTYPE GetWorkgroupFolderCount(size_t & outWorkgroupFolderCount) = 0;
  virtual VCOMError VCOM_CALLTYPE GetWorkgroupFolder(size_t index, IFolderIdentifier** outFolderID) = 0;
  virtual VCOMError VCOM_CALLTYPE AddWorkgroupFolder(IFolderIdentifier* intFolderID) = 0;

  virtual VCOMError VCOM_CALLTYPE SearchRootFoldersForRelativePath(const TXString& partialPath, IFileIdentifier** outFileID) = 0;
};

Members

ForEachFileInStandardFolder Enumerates files in specified standard folder.
ForEachFolderInStandardFolderClass Enumerate folders in specified standard folder.
ForEachWorkspaceFileWithDuplicates Enumerate workspace files in user, workgroup and application folders, including duplicate workspaces. Returns file path, name and folder location.
FindFileInStandardFolder Finds the first file in the search path with the given name.
GetFileInUserRoot Get the filename in the given folder under the [User] root.
GetNumFilesInStandardFolder Returns the number of unique files in the given folder class.
GetStandardFolderInUserRoot Returns the folder of the given 'class' under the [User] root.
GetStandardFolderInAppRoot Returns the folder of the given 'class' under the [App] root.
GetApplicationFolder Returns a folder identifier referring to the application folder.
GetUserFolder Returns a folder identifier referring to the user folder.
ClearStandardFolderCache Clears standard forlder sache.
GetWorkgroupFolderCount Returns the count of workgroup folders.
GetWorkgroupFolder Get particular workgroup folder.
AddWorkgroupFolder Insert a workgroup folder.
SearchRootFoldersForRelativePath Searches inside workgroup folders.

Remarks

There is predefined type for smart VCOM pointer VCOMPtr to IApplicationFolders interface:

typedef VCOMPtr<IApplicationFolders>  IApplicationFoldersPtr;

Version

Available from: VectorWorks 12

See Also

VCOM:VCOMPtr | VCOM:VectorWorks:Filing:IFolderIdentifier | VCOM:VectorWorks:Filing:IFileIdentifier

[[VCOM:VCOMPtr]] | [[VCOM:VectorWorks:Filing:IFolderIdentifier]] | [[VCOM:VectorWorks:Filing:IFileIdentifier]]