(self, filename, linkname=None)
return True
Add a layer to an image TAG
Add a layer to an image TAG
Add a layer to an image TAG
def add_image_layer(self, filename, linkname=None):
        """Add a layer to an image TAG"""
        if not self.cur_tagdir:
            return False
        if not os.path.exists(filename):
            return False
        if not os.path.exists(self.cur_tagdir):
            return False
        if linkname:
            linkname = self.cur_tagdir + '/' + os.path.basename(linkname)
        else:
            linkname = self.cur_tagdir + '/' + os.path.basename(filename)
        if os.path.islink(linkname):
            FileUtil(linkname).remove()
        self._symlink(filename, linkname)
        return True
def add_image_layer ( self , filename , linkname = None ) : if not self . cur_tagdir : return False if not os . path . exists ( filename ) : return False if not os . path . exists ( self . cur_tagdir ) : return False if linkname : linkname = self . cur_tagdir + '/' + os . path . basename ( linkname ) else : linkname = self . cur_tagdir + '/' + os . path . basename ( filename ) if os . path . islink ( linkname ) : FileUtil ( linkname ) . remove ( ) self . _symlink ( filename , linkname ) return True