Exemple #1
0
    def moveAsset(self, src, dst):
        """ rename or move a file or folder
        """
        frsSrc = self.frspath(src)
        if self.exists(frsSrc):
            frsDst = self.frspath(dst)
            if not self.exists(self.dirname(frsDst)):
                self.makedirs(self.dirname(frsDst))
            self.move(frsSrc, frsDst)

        if not self.exists(self.dirname(dst)):
            self.makedirs(self.dirname(dst))
        self.move(src, dst)

        CacheMixin.moveCache(self, src, dst)
Exemple #2
0
    def moveAsset(self, src, dst):
        """ rename or move a file or folder
        """
        frsSrc = self.frspath(src)
        if self.exists(frsSrc):
            frsDst = self.frspath(dst)
            if not self.exists( self.dirname(frsDst) ):
                self.makedirs(self.dirname(frsDst))
            self.move(frsSrc, frsDst )

        if not self.exists( self.dirname(dst) ):
            self.makedirs( self.dirname(dst) )
        self.move(src, dst)

        CacheMixin.moveCache(self, src, dst)
Exemple #3
0
    def moveAsset(self, src, dst):
        """ rename or move a file or folder
        """
        frsSrc = self.frspath(src)
        if self.exists(frsSrc):
            frsDst = self.frspath(dst)
            if not self.exists( self.dirname(frsDst) ):
                self.makedirs(self.dirname(frsDst))
            self.move(frsSrc, frsDst )

        if not self.exists( self.dirname(dst) ):
            self.makedirs( self.dirname(dst) )
        self.move(src, dst)

        #if self.version == 'json':
        #  me = self.getMetadata(dst)
        #  # how to uid?
        #  #移动后文件的intid也改变了,这里把id置为0,将在其他地方以intid替换
        #  me.metadata['zope']['id'] = 0
        #  self.saveMetadata(dst, me.metadata )

        CacheMixin.moveCache(self, src, dst)