def find_file( self, folder_id, basename, limit = 500 ):
        '''
        Finds a file based on a box path
        Returns a list of file IDs
        Returns multiple file IDs if the file was split into parts with the extension '.partN' (where N is an integer)
        '''
        search_folder = self.client.folder( folder_id = folder_id )
        offset = 0
        search_items = search_folder.get_items( limit = limit, offset = offset )
        found_files = []
        while len(search_items) > 0:
            files = [ (f['id'], f['name']) for f in search_items if f['name'].startswith( basename ) and f['type'] == 'file' ]
            files.sort()
            for f_id, f_name in files:
                assert(
                    f_name == basename
                    or
                    ( f_name.startswith( basename ) and f_name[len(basename):len(basename)+5] == '.part' )
                )
            found_files.extend( files )
            offset += limit
            search_items = search_folder.get_items( limit = limit, offset = offset )
        return [f[0] for f in found_files]
def find_file ( self , folder_id , basename , limit = 500 ) : search_folder = self . client . folder ( folder_id = folder_id ) offset = 0 search_items = search_folder . get_items ( limit = limit , offset = offset ) found_files = [ ] while len ( search_items ) > 0 : files = [ ( f [ 'id' ] , f [ 'name' ] ) for f in search_items if f [ 'name' ] . startswith ( basename ) and f [ 'type' ] == 'file' ] files . sort ( ) for f_id , f_name in files : assert ( f_name == basename or ( f_name . startswith ( basename ) and f_name [ len ( basename ) : len ( basename ) + 5 ] == '.part' ) ) found_files . extend ( files ) offset += limit search_items = search_folder . get_items ( limit = limit , offset = offset ) return [ f [ 0 ] for f in found_files ]
Finds a file based on a box path
        Returns a list of file IDs
        Returns multiple file IDs if the file was split into parts with the extension '.partN' (where N is an integer)