CBFS Storage 2020 Node.js Edition

Questions / Feedback?

GetSearchResultAttributes Method

Retrieves the attributes of a vault item found during a search operation.

Syntax

cbdrive.getSearchResultAttributes(searchHandle, [callback])

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for this method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

This method retrieves the attributes of a vault item (file, directory, symbolic link, or alternate stream) found via FindFirst/FindFirstByQuery/FindNext as part of the search operation identified by SearchHandle. Please refer to those methods' documentation for more information.

The value passed for SearchHandle must be a search operation handle returned by FindFirst or FindFirstByQuery.

The vault item's attributes are returned as a 32-bit integer composed of one or more of the following values:

CBFSSTORAGE_FATTR_FILE0x00000001The entry is a file.

CBFSSTORAGE_FATTR_DIRECTORY0x00000002The entry is a directory.

CBFSSTORAGE_FATTR_DATA_STREAM0x00000004The entry is an alternate data stream.

CBFSSTORAGE_FATTR_COMPRESSED0x00000008The file or stream is compressed.

CBFSSTORAGE_FATTR_ENCRYPTED0x00000010The file or stream is encrypted.

CBFSSTORAGE_FATTR_SYMLINK0x00000020The entry is a symbolic link.

CBFSSTORAGE_FATTR_READONLY0x00000040The file is read-only.

This attribute is not used by CBFS Storage, but it can be set and retrieved.

CBFSSTORAGE_FATTR_ARCHIVE0x00000080The file requires archiving.

This attribute is not used by CBFS Storage, but it can be set and retrieved.

CBFSSTORAGE_FATTR_HIDDEN0x00000100The file is hidden.

This attribute is not used by CBFS Storage, but it can be set and retrieved.

CBFSSTORAGE_FATTR_SYSTEM0x00000200The file is a system file.

This attribute is not used by CBFS Storage, but it can be set and retrieved.

CBFSSTORAGE_FATTR_TEMPORARY0x00000400The file is temporary.

This attribute is not used by CBFS Storage, but it can be set and retrieved.

CBFSSTORAGE_FATTR_DELETE_ON_CLOSE0x00000800The file should be deleted when the last handle to the file is closed.

This attribute is currently not supported by CBFS Storage.

CBFSSTORAGE_FATTR_RESERVED_00x00001000Reserved.

CBFSSTORAGE_FATTR_RESERVED_10x00002000Reserved.

CBFSSTORAGE_FATTR_RESERVED_20x00004000Reserved.

CBFSSTORAGE_FATTR_RESERVED_30x00008000Reserved.

CBFSSTORAGE_FATTR_NO_USER_CHANGE0x0000F03FA mask which includes all attributes that cannot be changed.

Applications cannot use the SetFileAttributes method to directly change any of the following attributes: FILE, DIRECTORY, DATA_STREAM, COMPRESSED, ENCRYPTED, SYMLINK, RESERVED_0, RESERVED_1, RESERVED_2, RESERVED_3.

CBFSSTORAGE_FATTR_USER_DEFINED0x7FF00000A mask for application-defined attributes.

Applications can use the SetFileAttributes method to set custom attributes, so long as their values are covered by this mask.

CBFSSTORAGE_FATTR_ANY_FILE0x7FFFFFFFA mask which includes any and all attributes.

However, if attributes were not requested as part of the specified search operation (by passing either 0 or a value including CBFSSTORAGE_FF_NEED_ATTRIBUTES for the FindFirst/FindFirstByQuery method's Flags parameter), this method will always return 0. Please refer to the documentation for these methods for more information.

Note: This method can only be called when Active is true.

Copyright (c) 2021 Callback Technologies, Inc. - All rights reserved.
CBFS Storage 2020 Node.js Edition - Version 20.0 [Build 8031]