FileMetadata

DIRAC FileCatalog plugin class to manage file metadata. This contains only non-indexed metadata for the moment.

class DIRAC.DataManagementSystem.DB.FileCatalogComponents.FileMetadata.FileMetadata(database=None)
__init__(database=None)
addMetadataField(pname, ptype, credDict)

Add a new metadata parameter to the Metadata Database. pname - parameter name, ptype - parameter type in the MySQL notation

deleteMetadataField(pname, credDict)

Remove metadata field

findFilesByMetadata(**kwargs)
getFileMetaParameters(path, credDict)

Get meta parameters for the given file

getFileMetadataFields(credDict)

Get all the defined metadata fields

getFileUserMetadata(path, credDict)

Get metadata for the given file

removeMetadata(path, metadata, credDict)

Remove the specified metadata for the given file

setDatabase(database)
setFileMetaParameter(path, metaName, metaValue, credDict)
setMetadata(path, metadict, credDict)

Set the value of a given metadata field for the the given directory path