main

 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import sys
from far_manager import *
command = sys.argv[1]
if command == 'create_file':
name = sys.argv[2]
create_file(name)
elif command == 'create_folder':
name = sys.argv[2]
create_folder(name)
elif command == 'get_list':
folder_only = sys.argv[2]
get_list(folder_only)
elif command == 'copy_file':
name = sys.argv[2]
new_name = sys.argv[3]
copy_file(name, new_name)
elif command == 'rename_file':
name = sys.argv[2]
new_name = sys.argv[3]
rename_file(name, new_name)
elif command == 'read_file':
name = sys.argv[2]
print(read_file(name))
elif command == 'write_in_file':
name = sys.argv[2]
text = sys.argv[3]
write_in_file(name, text)
elif command == 'delete_content_file':
name = sys.argv[2]
delete_content_file(name)
elif command == 'delete_content_folder':
name = sys.argv[2]
delete_content_folder(name)
elif command == 'delete_file':
name = sys.argv[2]
delete_file(name)
elif command == 'move_file':
name = sys.argv[2]
new_place = sys.argv[3]
move_file(name, new_place)
elif command == 'help_module':
help_module()