@@ -123,13 +123,13 @@ def dir(args):
123
123
file .TYPE_DICTIONARY : 'dictionary' ,
124
124
file .TYPE_FILE : 'file'
125
125
}
126
- tplt = "{0:{3} ^10}\t {1:{3 }^10}\t {2:^10 }"
127
- print (tplt .format ("type" , "name" , "permission" , chr (12288 )))
126
+ tplt = "{0:^10}\t {1:{4 }^10}\t {2:^20} \t {3:^30 }"
127
+ print (tplt .format ("type" , "name" , "permission" , "create_time" , chr (12288 )))
128
128
for i in res .dic :
129
129
permission = ""
130
130
if i .tag == file .TYPE_FILE :
131
131
permission = i .fcb .permission
132
- print (tplt .format (name_dic [i .tag ], i .file_name , permission , chr (12288 )))
132
+ print (tplt .format (name_dic [i .tag ], i .file_name , permission , time . strftime ( '%Y-%m-%d %H:%M:%S' , time . localtime ( i . create_time )), chr (12288 )))
133
133
return True
134
134
135
135
@@ -430,6 +430,7 @@ def write_command(args):
430
430
sid = usr_table .sid
431
431
sys_table = system_open_file_table [sid ]
432
432
file_item = sys_table .dic_item
433
+ sys_table .dic_item .last_modify_time = int (time .time ())
433
434
node_start = file_item .fcb .file_list
434
435
while node_start .next is not None :
435
436
node_start = node_start .next
@@ -590,10 +591,10 @@ def chmod_command(args):
590
591
command .register_command ("cd" , cd , "/cd <path>" )
591
592
command .register_command ("create" , create , "/create <path>" )
592
593
command .register_command ("mkdir" , mkdir , "/mkdir <pathname>" )
593
- command .register_command ("open" , open_command , "/open <pathname> <mode(1=readonly,2=writeonly,3=readwrite,4=runoly ,7=all)>" )
594
+ command .register_command ("open" , open_command , "/open <pathname> <mode(1=readonly,2=writeonly,3=readwrite,4=runonly ,7=all)>" )
594
595
command .register_command ("close" , close_command , "/close <uid>" )
595
596
command .register_command ("read" , read_command , "/read <uid>" )
596
597
command .register_command ("write" , write_command , "/write <uid> <stringbuffer>" )
597
598
command .register_command ("mv" , move_command , "/mv <ori_path> <new_path>" )
598
599
command .register_command ("rm" , delete_command , "/rm <path_name>" )
599
- command .register_command ("chmod" , chmod_command , "/chmod <pathname> <mode(1=readonly,2=writeonly,3=readwrite,4=runoly ,7=all)>" )
600
+ command .register_command ("chmod" , chmod_command , "/chmod <pathname> <mode(1=readonly,2=writeonly,3=readwrite,4=runonly ,7=all)>" )
0 commit comments