Final additions for submission
This commit is contained in:
parent
4d155bc61a
commit
3000681f02
26
README.md
Normal file
26
README.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#Stuffy
|
||||||
|
Made by: Gregory Crawford (gcrawfo@siue.edu)
|
||||||
|
|
||||||
|
#Compiling:
|
||||||
|
Open root folder where `Makefile` is located.
|
||||||
|
Type `make` and the program should compile to the `./bin` folder
|
||||||
|
|
||||||
|
#Usage:
|
||||||
|
bin/stuffy.out [-a | -l | -r | -e] [Archive Name] [Filename] > [Out Location]
|
||||||
|
|
||||||
|
#Arguments:
|
||||||
|
[-a] -- Enter a specific number of producers
|
||||||
|
Ex: `bin/stuffy.out -a test/files/newstuffyarchive.test test/files/temp.test`
|
||||||
|
|
||||||
|
[-l] -- List contents of [Archive Name] by `Name: [Filename] | Size: [Size]`
|
||||||
|
Ex: `bin/stuffy.out -l test/files/newstuffyarchive.test
|
||||||
|
|
||||||
|
[-r] -- Remove [Filename] from [Archive Name]
|
||||||
|
Ex: `bin/stuffy.out -r test/files/newstuffyarchive.test test/files/temp4.test`
|
||||||
|
|
||||||
|
[-e] -- Extract [Filename] data to stdout from [Archive Name]
|
||||||
|
Ex: `bin/stuffy.out -e test/files/newstuffyarchive.test test/files/temp3.test > test/files/output.test`
|
||||||
|
|
||||||
|
#Testing:
|
||||||
|
A few functions are built in for testing
|
||||||
|
Try running `make test` | 8/8 Tests should pass
|
@ -145,7 +145,7 @@ int IsFileArchived(char* archiveName, char* filename)
|
|||||||
{
|
{
|
||||||
readSize = ReadSingleModuleFromArchive(archiveFD, &(module));
|
readSize = ReadSingleModuleFromArchive(archiveFD, &(module));
|
||||||
free(module.moduleData);
|
free(module.moduleData);
|
||||||
if (strcmp(module.moduleHeader.moduleName, filename) == 0)
|
if (strcmp(module.moduleHeader.moduleName, newFilename) == 0)
|
||||||
{
|
{
|
||||||
free(newFilename);
|
free(newFilename);
|
||||||
close(archiveFD);
|
close(archiveFD);
|
||||||
|
Loading…
Reference in New Issue
Block a user