19 lines
288 B
C++
19 lines
288 B
C++
#include "common.hpp"
|
|
|
|
bool isFileExist(std::string &fs) {
|
|
FILE *fp;
|
|
if ((fp = fopen(fs.c_str(), "r")) == NULL) {
|
|
return false;
|
|
}
|
|
fclose(fp);
|
|
return true;
|
|
}
|
|
|
|
bool isFewArgs(int argc, int limit) {
|
|
bool ret = false;
|
|
if (argc < limit) {
|
|
ret = true;
|
|
}
|
|
return ret;
|
|
}
|