FileTagExists Method
Checks whether a file tag exists.
Syntax
ANSI (Cross Platform) int FileTagExists(const char* lpszFileName, int iTagId, const char* lpszTagName); Unicode (Windows) INT FileTagExists(LPCWSTR lpszFileName, INT iTagId, LPCWSTR lpszTagName);
- (BOOL)fileTagExists:(NSString*)fileName :(int)tagId :(NSString*)tagName;
#define MID_CBDRIVE_FILETAGEXISTS 21 CBFSSTORAGE_EXTERNAL int CBFSSTORAGE_CALL CBFSStorage_CBDrive_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);
Remarks
This method checks whether a file tag with the specified TagId or TagName is attached to the file, directory, or alternate stream specified by FileName. If the specified file tag exists, this method returns true; otherwise it returns false.
The value passed for FileName must be a vault-local absolute path.
To check for a raw file tag, pass its Id for TagId and pass empty string for TagName. To check for a typed file tag, pass its name for TagName and pass 0 for TagId. If values are provided for both TagId and TagName, this method fails with an error.
Please refer to the File Tags topic for more information.
Note: This method can only be called when Active is true.
Error Handling (C++)
This method returns a Boolean value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.