(self, host_file, cont_file)
Prepare individual file mapping
Prepare individual file mapping
Prepare individual file mapping
def set_file(self, host_file, cont_file):
        """Prepare individual file mapping"""
        if not os.path.isfile(host_file):
            return
        orig_file = cont_file.replace('/', '#')
        orig_file_path = self.container_orig_dir + '/' + orig_file
        cont_file_path = self.container_root + '/' + cont_file
        link_path = self.bind_dir + '/' + orig_file
        if not os.path.exists(orig_file_path):
            if os.path.isfile(cont_file_path):
                os.rename(cont_file_path, orig_file_path)
            else:
                return
            os.symlink(link_path, cont_file_path)
        FileUtil(orig_file_path).copyto(self.host_bind_dir)
def set_file ( self , host_file , cont_file ) : if not os . path . isfile ( host_file ) : return orig_file = cont_file . replace ( '/' , '#' ) orig_file_path = self . container_orig_dir + '/' + orig_file cont_file_path = self . container_root + '/' + cont_file link_path = self . bind_dir + '/' + orig_file if not os . path . exists ( orig_file_path ) : if os . path . isfile ( cont_file_path ) : os . rename ( cont_file_path , orig_file_path ) else : return os . symlink ( link_path , cont_file_path ) FileUtil ( orig_file_path ) . copyto ( self . host_bind_dir )