![]() ![]() html copying : test - dir - 2 copying : test - dir copying : solar. sh c8bbb088 - cbaf - 411 d - 8 bd8 - 9870763 f0e5f Loading ccnet config from / home / foo / haiwen / ccnet Loading seafile config from / home / foo / haiwen / seafile - data copying : test. ![]() If you execute script file successfully, you will see these output, and of course a new library at myhome page of Seahub.įoo foo : ~/ haiwen / seafile - server - 3.0.3 / upgrade $. New Library( %s ): %d files." % ( origin_repo_id, count_files_recursive ( origin_repo_id ), new_repo_id, count_files_recursive ( new_repo_id )) print "*" * 60 copy_file ( origin_repo_id, '/', obj_name, new_repo_id, '/', obj_name, username, 0, 1 ) print "*" * 60 print "OK, verifying." print "Origin library( %s ): %d files. ![]() list_dir_by_path ( origin_repo_id, '/' ) for e in dirents : print "copying: " + e. desc, username = username, passwd = None ) #Copy stuffs from old library to new library dirents = seafile_api. get_repo_owner ( origin_repo_id ) #Create a new library, set name, desc and owner new_repo_id = seafile_api. get_repo ( origin_repo_id ) username = seafile_api. argv #Get origin_repo object origin_repo = seafile_api. obj_name )) else : num_files += 1 return num_files #Get library ID from input origin_repo_id = sys. mode ): num_files += count_files_recursive ( repo_id, os. list_dir_by_path ( repo_id, path ): if stat. #!/usr/bin/env python import os import stat import sys from seaserv import seafile_api def count_files_recursive ( repo_id, path = '/' ): num_files = 0 for e in seafile_api.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |