Loading ifs_test/wr_test.cpp +15 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ #include <fcntl.h> #include <unistd.h> #include <cstring> #include <sys/stat.h> using namespace std; Loading Loading @@ -53,6 +54,20 @@ int main(int argc, char* argv[]) { return -1; } /* Check file size */ struct stat st; ret = stat(p.c_str(), &st); if(ret != 0){ cerr << "Error stating file: " << strerror(errno) << endl; return -1; }; if(st.st_size != strlen(buffIn)){ cerr << "Wrong file size after creation: " << st.st_size << endl; return -1; } /* Read the file back */ Loading Loading
ifs_test/wr_test.cpp +15 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ #include <fcntl.h> #include <unistd.h> #include <cstring> #include <sys/stat.h> using namespace std; Loading Loading @@ -53,6 +54,20 @@ int main(int argc, char* argv[]) { return -1; } /* Check file size */ struct stat st; ret = stat(p.c_str(), &st); if(ret != 0){ cerr << "Error stating file: " << strerror(errno) << endl; return -1; }; if(st.st_size != strlen(buffIn)){ cerr << "Wrong file size after creation: " << st.st_size << endl; return -1; } /* Read the file back */ Loading