Skip to content

Commit

Permalink
Added code so filepath can be supplied as a command line arg
Browse files Browse the repository at this point in the history
  • Loading branch information
padraigmc committed Mar 9, 2022
1 parent 6a2349b commit f06a336
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
15 changes: 13 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
from phase_1 import DiskDrive
import sys


def main():
# get filepath from arguments list
if len(sys.argv) > 1:
file_path = sys.argv[1]
else:
file_path = r'D:\repos\ET4027\FS-Forensics\Sample_1.dd'

fs = DiskDrive(file_path)
fs.print_partition_information()


if __name__ == '__main__':
fs = DiskDrive(r'D:\repos\ET4027\AssignmentDrive\et4027.dd')
fs.print_partition_information()
main()
7 changes: 7 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Pádraig McCarthy - 18227465
Lucy Dolan Egan - 18222765


Intructions:

python main.py {path_to_file}

0 comments on commit f06a336

Please sign in to comment.