ankitkumar2010@vit.ac.in
BAN USER- -1of 1 vote
AnswersThe question was that you need to implement virtual directory using dynamic structure . For example :-
- ankitkumar2010@vit.ac.in in India for Zoho
VIT is the root directory then
VIT>CS
VIT>Building Science
.
.
Then each department should have its branch
VIT>CS>CSE
VIT>CS>IT
VIT>CS>MCA
Furthermore each branch will have a number of files i.e
VIT>CS>CSE>file1.txt
VIT>CS>CSE>file2.txt
VIT>CS>IT>file1.txt
Note-No need to create actual files just store the name .
Each file should have properties :-
1) RO(Read Only) or WO(Write Only)
2) Hidden or Visible etc.
List of Commands :-
1) addFile(<file name>) to add file
2) addHiddenFile(<filename>) to add hidden file
3) setReadOnly<filename> to set read only property
4) gotoDir to go to a particular directory
5) listFiles to list files
6) listAllFiles to list all files including hidden files
7) details to display all details of files
8) delete to just to mark the file as deleted but you don't need to actually delete it.
I used nested structures to implement it. Can anyone give a more proper solution with the code?| Report Duplicate | Flag | PURGE
Software Engineer / Developer Data Structures