Skip to content

Piyush-0120/FileManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

File Manager

This project is an implementation of Generic trees (N-ary trees) to create and store the hierarchies of files and folders. It also provides traversal, deletion, listing items within a directory/folder and, opening and saving of files.

Description

image

Implementation of Generic Tree using a Linked List

Generic tree is a tree in which each node can have many children or nodes. Each sub-node is a folder or a file as specified by the user under one root node. To provide the traversal of the nodes according to the user, command line arguments are used.

The nodes representing the folders are present only during the runtime. The hierarchy is presented as if it stored in a drive (virtual drive) but actually it is not stored in any drive. For the files, it gets stored in the memory in folder called that.dumps which is created (on the same folder where the FileManager.c file is saved in secondary memory of the user) during the runtime to store all the files created during the execution of the program irrespective of their presence in same or different directory/folder. All the files are dumped into that.dumps so it necessary to mention different filename for each file in other directories whereas same foldername can be repeated in other directories.

While making a file, an editor opens up to edit the file. Here I have used Notepad from Windows OS as an editor. Therefore, user can write text files and save it in the virtual directory. When the user comes out of the virtual drive, all files that were created in that.dumps during execution gets deleted to prepare that.dumps folder for a fresh start.

Commands

Make directory

mkdir foldername

Make file

mkfile filename

Change directory

cd foldername

Previous directory

cd ..

Open file

open filename

Remove directory

remove foldername

Remove file

remove filename

Display a directory's files and subdirectories

ls -a

Display tree of all folders and files

ls -all

Results

2021-05-23 (2)

2021-05-23 (3)

2021-05-23 (4)

2021-05-23 (5)

2021-05-23 (6)

2021-05-23 (7)

2021-05-23 (8)

2021-05-23 (9)

2021-05-23 (10)

2021-05-23 (11)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages