MCPcopy Create free account
hub / github.com/LCBOWER33/StegoScan / copy_local_files

Function copy_local_files

StegoScan.py:432–452  ·  view source on GitHub ↗
(source, destination)

Source from the content-addressed store, hash-verified

430
431
432def copy_local_files(source, destination):
433 if os.path.isdir(source):
434 for file_name in os.listdir(source):
435 full_source_path = os.path.join(source, file_name)
436 if os.path.isfile(full_source_path):
437 file_extension = file_name.split('.')[-1] if '.' in file_name else 'unknown'
438 file_type_dir = os.path.join(destination, file_extension)
439 os.makedirs(file_type_dir, exist_ok=True)
440 full_destination_path = os.path.join(file_type_dir, file_name)
441 shutil.copy(full_source_path, full_destination_path)
442 # print(f"Copied: {full_source_path} -> {full_destination_path}")
443 elif os.path.isfile(source):
444 file_name = os.path.basename(source)
445 file_extension = file_name.split('.')[-1] if '.' in file_name else 'unknown'
446 file_type_dir = os.path.join(destination, file_extension)
447 os.makedirs(file_type_dir, exist_ok=True)
448 full_destination_path = os.path.join(file_type_dir, file_name)
449 shutil.copy(source, full_destination_path)
450 # print(f"Copied: {source} -> {full_destination_path}")
451 else:
452 prRed(f"Invalid local path: {source}")
453
454
455def is_web_server(ip):

Callers 2

start_progressFunction · 0.85
mainFunction · 0.85

Calls 1

prRedFunction · 0.85

Tested by

no test coverage detected