예제 #1
0
파일: main.py 프로젝트: baijian/baidu-cloud
def read_dir(dir_name):
    current_path = dir_name
    files = os.listdir(dir_name)
    for f in files:
        if os.path.isfile(current_path + '/' + f):
            remote_path = Constants.PCS_BASE_DIR + '/' + current_path + '/' + f
            PCS.upload_file_to_pcs(remote_path, current_path + '/' + f, True)
        else:
            read_dir(current_path + '/' + f)
예제 #2
0
파일: Test.py 프로젝트: baijian/baidu-cloud
# -*- coding: utf-8 -*-
import PCS


if __name__ == '__main__':
    quota_info = PCS.get_pcs_quota()
    print quota_info['quota']
    print quota_info['used']