DBFILESSearchArg
Objective-C
@interface DBFILESSearchArg : NSObject <DBSerializable, NSCopying>
Swift
class DBFILESSearchArg : NSObject, DBSerializable, NSCopying
The SearchArg
struct.
This class implements the DBSerializable
protocol (serialize and
deserialize instance methods), which is required for all Obj-C SDK API route
objects.
-
The path in the user’s Dropbox to search. Should probably be a folder.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull path;
Swift
var path: String { get }
-
The string to search for. Query string may be rewritten to improve relevance of results. The string is split on spaces into multiple tokens. For file name searching, the last token is used for prefix matching (i.e. “bat c” matches “bat cave” but not “batman car”).
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull query;
Swift
var query: String { get }
-
The starting index within the search results (used for paging).
Declaration
Objective-C
@property (nonatomic, readonly) NSNumber *_Nonnull start;
Swift
var start: NSNumber { get }
-
The maximum number of search results to return.
Declaration
Objective-C
@property (nonatomic, readonly) NSNumber *_Nonnull maxResults;
Swift
var maxResults: NSNumber { get }
-
The search mode (filename, filename_and_content, or deleted_filename). Note that searching file content is only available for Dropbox Business accounts.
Declaration
Objective-C
@property (nonatomic, readonly) DBFILESSearchMode *_Nonnull mode;
Swift
var mode: DBFILESSearchMode { get }
-
Full constructor for the struct (exposes all instance variables).
Declaration
Objective-C
- (nonnull instancetype)initWithPath:(nonnull NSString *)path query:(nonnull NSString *)query start:(nullable NSNumber *)start maxResults:(nullable NSNumber *)maxResults mode:(nullable DBFILESSearchMode *)mode;
Swift
init(path: String, query: String, start: NSNumber?, maxResults: NSNumber?, mode: DBFILESSearchMode?)
Parameters
path
The path in the user’s Dropbox to search. Should probably be a folder.
query
The string to search for. Query string may be rewritten to improve relevance of results. The string is split on spaces into multiple tokens. For file name searching, the last token is used for prefix matching (i.e. “bat c” matches “bat cave” but not “batman car”).
start
The starting index within the search results (used for paging).
maxResults
The maximum number of search results to return.
mode
The search mode (filename, filename_and_content, or deleted_filename). Note that searching file content is only available for Dropbox Business accounts.
Return Value
An initialized instance.
-
Convenience constructor (exposes only non-nullable instance variables with no default value).
Declaration
Objective-C
- (nonnull instancetype)initWithPath:(nonnull NSString *)path query:(nonnull NSString *)query;
Swift
init(path: String, query: String)
Parameters
path
The path in the user’s Dropbox to search. Should probably be a folder.
query
The string to search for. Query string may be rewritten to improve relevance of results. The string is split on spaces into multiple tokens. For file name searching, the last token is used for prefix matching (i.e. “bat c” matches “bat cave” but not “batman car”).
Return Value
An initialized instance.