django_ocr_server/models.py
def remove_files(folder, files):
            """
            Removes all files in the 'folder' exclude 'files'
            :param folder: the path to the folder in which will be files removed
            :param files: files that will be excluded from removing
            :return: the list of path of removed files
            """
            removed = []
            for r, d, f in os.walk(folder):
                for file in f:
                    path = os.path.join(r, file)
                    if path not in files:
                        os.remove(path)
                        removed.append(path)
            return removed

            Removes all files in the 'folder' exclude 'files'
            :param folder: the path to the folder in which will be files removed
            :param files: files that will be excluded from removing
            :return: the list of path of removed files
            
Removes all files in the 'folder' exclude 'files'
Removes all files in the ' folder ' exclude ' files '
def remove_files(folder, files):
            removed = []
            for r, d, f in os.walk(folder):
                for file in f:
                    path = os.path.join(r, file)
                    if path not in files:
                        os.remove(path)
                        removed.append(path)
            return removed
def remove_files ( folder , files ) : removed = [ ] for r , d , f in os . walk ( folder ) : for file in f : path = os . path . join ( r , file ) if path not in files : os . remove ( path ) removed . append ( path ) return removed
Removes all files in the 'folder' exclude 'files'
Removes all files in the ' folder ' exclude ' files '
"""
            Removes all files in the 'folder' exclude 'files'
            :param folder: the path to the folder in which will be files removed
            :param files: files that will be excluded from removing
            :return: the list of path of removed files
            """
the list of path of removed files
the list of path of removed files
folder
the path to the folder in which will be files removed
the path to the folder in which will be files removed
files
files that will be excluded from removing
files that will be excluded from removing