File Manager is a command line tool, designed to operate on basic input/output/info operations on files, including and limited to named pipes, unnamed pipes, regular files on UNIX System.
Operations allowed:
- Create
- Read
- Write
- Info
First compile the code to make the executable file
gcc file_manager.c -o file_manager
To run the tool
./file_manager <file-type> <file-name> <mode>
The allowed file-types are
- Unnamed Pipe- "unnamed-pipe"
- Named Pipe- "named-pipe"
- Normal File- "file"
User-defined name for named pipes and regular files. (Not required in case of unnamed pipes).
- create- Allows creation of named pipes and regular files.
- read- Allows to read from a named pipe and a regular file.
- write- Allows to write to a named pipe and a regular file.
- info- Displays the info about the named pipe and regular file.
Note: These operations are not allowed in case of unnamed pipes.
./file_manager named-pipe create fifo1
./file_manager file f1.txt read
./file_manager unnamed-pipe
The tool consists of 3 header files "namedpipe.h", "unnamedpipe.h", "file.h" and the driver code "file_manager.c".
Deals with the opeartion oriented to named pipes, i.e. creation, read, write, info.
Creates a unnamedpipe, which takes input from the user and generates the output on the console.
Deals with the opeartion oriented to regular files, i.e. creation, read, write, info.
Vaishnavi Jha, M.Sc. 1st Year (2021-23) Department of Computer Science, University of Delhi