edit main.cpp order
This commit is contained in:
@@ -16,32 +16,11 @@
|
||||
#define INPUT_FILE_NAME "MyZip.txt"
|
||||
#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 FileReader()
|
||||
{
|
||||
LocalFileHeader LFHeader{};
|
||||
@@ -92,7 +71,7 @@ bool FileReader()
|
||||
else if(filesystem::is_regular_file(currentEntry))
|
||||
{
|
||||
// TODO : 파일 Archiving logic
|
||||
ZipArchiver();
|
||||
ZipArchiver(currentEntry);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -235,3 +214,22 @@ 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;
|
||||
}
|
||||
Reference in New Issue
Block a user