Lines Matching refs:dir_entry
164 def get_cmd_list(multiprocessing, dir_entry, gs_path): argument
180 target = os.path.join(gs_path, os.path.basename(dir_entry))
184 cmd += ['-eR', dir_entry, target]
233 def sanitize_dir(dir_entry): argument
242 if not os.path.exists(dir_entry):
247 for root, dirs, files in os.walk(dir_entry):
282 def _get_zippable_folders(dir_entry): argument
284 for folder in os.listdir(dir_entry):
285 folder_path = os.path.join(dir_entry, folder)
292 def limit_file_count(dir_entry): argument
302 count = utils.run('find "%s" | wc -l' % dir_entry,
307 logging.warning('Fail to get the file count in folder %s.', dir_entry)
316 dir_entry)
318 folders = _get_zippable_folders(dir_entry)
338 def correct_results_folder_permission(dir_entry): argument
347 if not dir_entry:
350 logging.info('Trying to correct file permission of %s.', dir_entry)
353 ['sudo', '-n', 'chown', '-R', str(os.getuid()), dir_entry])
355 ['sudo', '-n', 'chgrp', '-R', str(os.getgid()), dir_entry])
358 dir_entry, e)
361 def upload_testresult_files(dir_entry, multiprocessing): argument
370 for host in glob.glob(os.path.join(dir_entry, '*')):
464 def _create_test_result_notification(gs_path, dir_entry): argument
472 gcs_uri = os.path.join(gs_path, os.path.basename(dir_entry))
499 def offload_dir(dir_entry, dest_path, job_complete_time): argument
514 RESULTS_DIR, dir_entry)
516 sanitize_dir(dir_entry)
518 upload_testresult_files(dir_entry, multiprocessing)
521 limit_file_count(dir_entry)
529 get_cmd_list(multiprocessing, dir_entry, gs_path),
535 dir_size = get_directory_size_kibibytes(dir_entry)
546 gs_path, dir_entry)
558 shutil.rmtree(dir_entry)
575 'seconds.', dir_entry, OFFLOAD_TIMEOUT_SECS)
583 correct_results_folder_permission(dir_entry)
595 logging.warning('Error occurred when offloading %s:', dir_entry)
606 correct_results_folder_permission(dir_entry)
614 def delete_files(dir_entry, dest_path, job_complete_time): argument
625 shutil.rmtree(dir_entry)