-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMain.py
More file actions
29 lines (20 loc) · 729 Bytes
/
Main.py
File metadata and controls
29 lines (20 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from FileManagementSystem import *
file_system = FileManagementSystem()
def create_file_system():
print("Creating new file system...\n")
file_system.create_file("fileInRoot.txt")
file_system.create_directory("dir1")
file_system.change_directory("dir1")
file_system.create_file("fileInDir1.txt")
file_system.create_directory("dir2")
file_system.change_directory("dir2")
file_system.create_file("fileInDir2.txt")
file_system.write_file("fileInDir2.txt", "Hello World")
file_system.save()
if os.path.exists("file_system.pickle"):
print("Loading file system...\n")
file_system = file_system.load()
else:
create_file_system()
file_system.MemoryMap()
file_system.terminal()