• Inserts or updates a field in a files' metadata. This is more efficient than checking yourself with doesFieldExistInTFile and then inserting with insertFieldInTFile or updating with updateFieldInTFile.

    Throws

    Error If the parent of the field to update/insert does not exist, e.g. if the method is called with the field foo.bar, but foo does not exist in the metadata this method will throw.

    Throws

    OPDTraversalError If field is an invalid path to a metadata field.

    Parameters

    • field: string

      The field to update/insert, this can also be a path to a nested object e.g. foo.bar, a path to a specific index in an array e.g. foo[0] or any combination of those e.g. foo['bar'].baz[0], like you are used to from javascript, except that the ? operator is not supported.

    • value: any

      The new value of the field.

    • file: TFile
    • plugin: Plugin_2
    • isInline: boolean = false

      unused for now

    Returns Promise<void>

Generated using TypeDoc