示例#1
0
    def rmcoll(self, path, recursive=False, **kwargs):
        """
        remove collection

        Optional Keyword args: 'forceFlag', 'recursiveOpr' and 'irodsRmTrash'

        :param path: the location of the collection
        :type path: str
        :param recursive: recursively delete
        :type recursive: bool
        :returns: a dictionary containing the int_info and the data
        :rtype: dict
        """
        data = Container(collName=path, flags=0, oprType=0, keyValPair=Container(keyWords=[], len=0, values=[]))
        if recursive:
            data.keyValPair.len = data.keyValPair.len + 1
            data.keyValPair.keyWords.append("recursiveOpr")
            data.keyValPair.values.append("1")
        for k, v in kwargs.items():
            data.keyValPair.len = data.keyValPair.len + 1
            data.keyValPair.keyWords.append(k)
            data.keyValPair.values.append(v)
        return {"int_info": api.RM_COLL_AN, "data": collInp.build(data)}
示例#2
0
 def mkcoll(self, path):
     data = Container(collName=path, flags=0, oprType=0, keyValPair=Container(len=0, keyWords=[], values=[]))
     return {"int_info": api.COLL_CREATE_AN, "data": collInp.build(data)}