diff --git a/main.cpp b/main.cpp index c11780e..56bb861 100644 --- a/main.cpp +++ b/main.cpp @@ -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 { @@ -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; } \ No newline at end of file