VCOM:VectorWorks:Filing:IFolderIdentifier::Set

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

Member of VCOM:VectorWorks:Filing:IFolderIdentifier

Set folder definition.

virtual VCOMError VCOM_CALLTYPE Set(
const TXString& fullPath) = 0;
virtual VCOMError VCOM_CALLTYPE Set(
EFolderSpecifier folderSpec,
bool bUserFolder) = 0;
virtual VCOMError VCOM_CALLTYPE Set(
EFolderSpecifier folderSpec,
bool bUserFolder,
const TXString& subFolderName) = 0;
virtual VCOMError VCOM_CALLTYPE Set(
IFolderIdentifier* pParentFolder,
const TXString& folderName) = 0;

Parameters

fullPath const TXString& Full path for the folder identifier. The full path could use '\' or '/' or ':' as path delimiter.
folderSpec EFolderSpecifier Standard folder location identifier. See Working with File Identifiers.
bUserFolder bool When false the specified folder is within VectorWorks folder hierarchy; true means that this folder should be the one from the user specific folder hierarchy.
folderName const TXString& Could be just folder name or sub folders having '\' or '/' or ':' as path delimiter.
pParentFolder IFolderIdentifier Parent folder in which the sub folder will be added.

Return Value

Uses standard VCOM Error Reporting.

Return value meaning:

kVCOMError_NotInitialized Bad VCOM instance used to call the fuction.
kVCOMError_InvalidArg Invalid argument passed. NULL, empty string or not IFolderIdentifier as parent is invalid arguments.
kVCOMError_Failed Invalid path specified. This should be rare error condition since the funtion tries to handle all paths.

Remarks

For default locations see Working with File Identifiers.

The finction recognizes sub paths which will be added to the path specified or the parent folder.

The funtion recognizes ".." in the sub path.

The function tries to correct the path specified. The invalid character are substituted with valid:

On Windows invalid characters are:

Invalid Character Substituted with
/ %5C
\ %2F
: %3A
* %2A
? %3F
" %22
< %3C
> %3E
| %7C

On Macintosh OS the only folder name invalid character is ':'. However if you put that character in the folder path, it will result the folder name to have '/' at that place.

So, if you have specified the following folder name: "myFolder/mySub:Folder"

This with result in the following path (Mac only!): "myFolder" with sub folder "mySub/Folder"

The semi-collon (:) character is used to represent the '/' character if POSIX file paths (file paths where the symbol '/' is used as path delimiter)

See Also

VCOM:VectorWorks:Filing:IFolderIdentifier

[[VCOM:VectorWorks:Filing:IFolderIdentifier]]