Skip to content

Commit

Permalink
# _PyFiTransfer_
Browse files Browse the repository at this point in the history
> _**v0.3.0** Update Notes..._

---

## Source Code

- Added virtual environment to local structure.
- Added `__init__.py`
- Increased loading time during transfer process.
- Minor additons to text prompts throughout process.

---

Signed-off-by: schlopp96 <[email protected]>
  • Loading branch information
schlopp96 committed Feb 8, 2022
1 parent e18c1d2 commit ecf849b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PyFiTransfer

> **_Python File Transfer v0.2.0_**
> **_Python File Transfer v0.3.0_**
## About

Expand Down
Empty file added src/__init__.py
Empty file.
22 changes: 11 additions & 11 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@


def main() -> NoReturn | None:
"""Program method wrapper/entry point.
"""Program entry point.
:return: [description]
:rtype: [type]
:return: Program starting method.
:rtype: NoReturn | None
"""
origin: str | PathLike = getOrigin()
destination: str | PathLike = getDestination()
Expand Down Expand Up @@ -68,7 +68,7 @@ def verify(directory: PathLike | str) -> bool:
if isDir(directory):
load(
f'\nVerifying destination for file location:\n> "{directory}"',
'Directory verified successfully!', False)
'\nDirectory verified successfully!', False)
return True
else:
load(
Expand All @@ -83,17 +83,17 @@ def verify(directory: PathLike | str) -> bool:

def transfer(origin, destination, fileType) -> Any:
files: list = []
print('\n> Transferring files now...')
print('\n> Transferring files now...\n')
with lsContents(origin) as dirFiles:
for file in dirFiles:
if not file.name.startswith('.') and file.name.endswith(
f'.{fileType}') == True and file.is_file():
files.append(file.name)
copyfile(file, (destination + "\\" + base(file)))
load(
'> Copying correct files',
f'> {len(files)} files successfully copied to new location:\n{files}'
)
f'> Transferring all ".{fileType}" type files to {destination}',
f'> {len(files)} files successfully copied to new location:\n{files}',
time=30)


def Ex_0() -> NoReturn | None:
Expand All @@ -102,7 +102,7 @@ def Ex_0() -> NoReturn | None:
:return: Exits program.
:rtype: NoReturn
"""
print('\n\nOperation Successfull!')
input('\n\nOperation Successfull!\n\nPress ENTER to exit.')
return exit()


Expand All @@ -114,8 +114,8 @@ def Ex_1(fileType: str) -> NoReturn | None:
:return: Exits program.
:rtype: NoReturn
"""
print(
f'\n\n> Operation Failure!\n\n> No Files were found with given extension: ".{fileType}".\n'
input(
f'\n\n> Operation Failure!\n\n> No Files were found with given extension: ".{fileType}".\n\nPress ENTER to exit.'
)
return exit()

Expand Down

0 comments on commit ecf849b

Please sign in to comment.