VCOM:VectorWorks:Filing:IFileIdentifier::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:IFileIdentifier

Set file path to this instance.

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

Parameters

fullPath const TXString& The OS full path that represents this file.
folderSpec EFolderSpecifier Folder specifier for the parent of this file. See Working with File Identifiers.
bUserFolder bool true if the folder specified represents folder in the user subfolders.
pFolderID IFolderIdentifier* The parent folder in which this file identifier should represent file.
fileName TXString File name. Can contain relative path and file name.

Return Value

Uses standard VCOM Error Reporting.

Return value meaning:

kVCOMError_NotInitialized Bad VCOM instance used to call the fuction.
kVCOMError_Failed Routine failed.

Remarks

For standard locations see Working with File Identifiers.

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

The function 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)

Note When specifying relative path as file name '/' is used for folder name delimiter, and '.' for file extension delimiter.

See Also

VCOM:VectorWorks:Filing:IFolderIdentifier | VCOM:VectorWorks:Filing:IFileIdentifier | VCOM:VectorWorks:Filing:IFileChooserDialog

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