diff options
author | adityacp | 2016-07-11 16:47:16 +0530 |
---|---|---|
committer | adityacp | 2016-07-28 15:56:06 +0530 |
commit | 6a62d23842b64bbc20bda8ddca718c58a0e422cb (patch) | |
tree | d91505b1d11c575c5eb4719ccb774c1b277ff0fe | |
parent | 21f53d77a83ce683ad64b2031cd2b8b7aba05c26 (diff) | |
download | online_test-6a62d23842b64bbc20bda8ddca718c58a0e422cb.tar.gz online_test-6a62d23842b64bbc20bda8ddca718c58a0e422cb.tar.bz2 online_test-6a62d23842b64bbc20bda8ddca718c58a0e422cb.zip |
deleted copy_delete_files.py
-rw-r--r-- | yaksh/copy_delete_files.py | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/yaksh/copy_delete_files.py b/yaksh/copy_delete_files.py deleted file mode 100644 index f34b944..0000000 --- a/yaksh/copy_delete_files.py +++ /dev/null @@ -1,29 +0,0 @@ -import shutil -import os -import zipfile - - -class CopyDeleteFiles(object): - - def copy_files(self, file_paths): - files = [] - for src in file_paths: - file_path, extract = src - file_name = os.path.basename(file_path) - files.append(file_name) - shutil.copy(file_path, os.getcwd()) - if extract: - unzip = zipfile.ZipFile(file_name) - for zip_files in unzip.namelist(): - files.append(zip_files) - unzip.extractall() - unzip.close() - return files - - def delete_files(self, files): - for content in files: - if os.path.exists(content): - if os.path.isfile(content): - os.remove(content) - else: - shutil.rmtree(content) |