DBFILESSearchMatchType

Objective-C

@interface DBFILESSearchMatchType : NSObject <DBSerializable, NSCopying>

Swift

class DBFILESSearchMatchType : NSObject, DBSerializable, NSCopying

The SearchMatchType union.

Indicates what type of match was found for a given item.

This class implements the DBSerializable protocol (serialize and deserialize instance methods), which is required for all Obj-C SDK API route objects.

Instance fields

Constructors

  • Initializes union class with tag state of “filename”.

    Description of the “filename” tag state: This item was matched on its file or folder name.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithFilename;

    Swift

    init(filename: ())

    Return Value

    An initialized instance.

  • Initializes union class with tag state of “content”.

    Description of the “content” tag state: This item was matched based on its file contents.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithContent;

    Swift

    init(content: ())

    Return Value

    An initialized instance.

  • Initializes union class with tag state of “both”.

    Description of the “both” tag state: This item was matched based on both its contents and its file name.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithBoth;

    Swift

    init(both: ())

    Return Value

    An initialized instance.

Tag state methods

  • Retrieves whether the union’s current tag state has value “filename”.

    Declaration

    Objective-C

    - (BOOL)isFilename;

    Swift

    func isFilename() -> Bool

    Return Value

    Whether the union’s current tag state has value “filename”.

  • Retrieves whether the union’s current tag state has value “content”.

    Declaration

    Objective-C

    - (BOOL)isContent;

    Swift

    func isContent() -> Bool

    Return Value

    Whether the union’s current tag state has value “content”.

  • Retrieves whether the union’s current tag state has value “both”.

    Declaration

    Objective-C

    - (BOOL)isBoth;

    Swift

    func isBoth() -> Bool

    Return Value

    Whether the union’s current tag state has value “both”.

  • Retrieves string value of union’s current tag state.

    Declaration

    Objective-C

    - (nonnull NSString *)tagName;

    Swift

    func tagName() -> String

    Return Value

    A human-readable string representing the union’s current tag state.