edit main.cpp order
This commit is contained in:
@@ -16,32 +16,11 @@
|
|||||||
#define INPUT_FILE_NAME "MyZip.txt"
|
#define INPUT_FILE_NAME "MyZip.txt"
|
||||||
#define OUTPUT_FILE_NAME "MyZip.zip"
|
#define OUTPUT_FILE_NAME "MyZip.zip"
|
||||||
|
|
||||||
bool FileReader();
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
std::printf("==================== Hello Zip! ====================\r\n");
|
|
||||||
int iRet = 0;
|
|
||||||
|
|
||||||
// Main Zip archive method
|
|
||||||
if(!FileReader())
|
|
||||||
{
|
|
||||||
iRet = -1;
|
|
||||||
std::printf("[ ERROR ] Somthing went Wrong... \r\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
std::printf("==================== Good Bye Zip! ====================\r\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
return iRet;
|
|
||||||
}
|
|
||||||
bool searchDir()
|
bool searchDir()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool FileReader()
|
bool FileReader()
|
||||||
{
|
{
|
||||||
LocalFileHeader LFHeader{};
|
LocalFileHeader LFHeader{};
|
||||||
@@ -92,7 +71,7 @@ bool FileReader()
|
|||||||
else if(filesystem::is_regular_file(currentEntry))
|
else if(filesystem::is_regular_file(currentEntry))
|
||||||
{
|
{
|
||||||
// TODO : 파일 Archiving logic
|
// TODO : 파일 Archiving logic
|
||||||
ZipArchiver();
|
ZipArchiver(currentEntry);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -233,5 +212,24 @@ bool ZipArchiver()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return iRet;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
std::printf("==================== Hello Zip! ====================\r\n");
|
||||||
|
int iRet = 0;
|
||||||
|
|
||||||
|
// Main Zip archive method
|
||||||
|
if (!FileReader())
|
||||||
|
{
|
||||||
|
iRet = -1;
|
||||||
|
std::printf("[ ERROR ] Somthing went Wrong... \r\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::printf("==================== Good Bye Zip! ====================\r\n");
|
||||||
|
}
|
||||||
|
|
||||||
return iRet;
|
return iRet;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user