filesys test reviewed
This commit is contained in:
parent
2c1d1de266
commit
72117b5314
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: filesys_test.cpp,v 1.2 2005/07/06 02:10:07 cozman Exp $
|
||||
// $Id: filesys_test.cpp,v 1.3 2005/07/20 01:43:57 cozman Exp $
|
||||
|
||||
#include "photon.hpp"
|
||||
#include <iostream>
|
||||
@ -14,6 +14,8 @@ using namespace std;
|
||||
using namespace photon;
|
||||
using namespace photon::util;
|
||||
|
||||
// Basic test of util::filesys functionality, simply outputs essentially
|
||||
// all information available via util::filesys.
|
||||
class FilesysTest : public Application
|
||||
{
|
||||
public:
|
||||
@ -59,14 +61,20 @@ public:
|
||||
}
|
||||
cout << endl;
|
||||
|
||||
cout << "filesys_test.cpp" << (filesys::exists("filesys_test.cpp") ? " exists" : " not found") << endl;
|
||||
cout << "wokka " << (filesys::exists("wokka") ? " exists" : " not found") << endl;
|
||||
cout << "filesys_test.cpp"
|
||||
<< (filesys::exists("filesys_test.cpp") ? " exists" : " not found")
|
||||
<< endl;
|
||||
cout << "wokka "
|
||||
<< (filesys::exists("wokka") ? " exists" : " not found") << endl;
|
||||
|
||||
cout << "making directory 'bam'" << endl;
|
||||
filesys::mkdir("bam");
|
||||
|
||||
cout << "bam " << (filesys::isDir("bam") ? " is dir" : " not dir") << endl;
|
||||
cout << "filesys_test.cpp" << (filesys::isDir("filesys_test.cpp") ? " is dir" : " not dir") << endl;
|
||||
cout << "bam " << (filesys::isDir("bam") ? " is dir" : " not dir")
|
||||
<< endl;
|
||||
cout << "filesys_test.cpp"
|
||||
<< (filesys::isDir("filesys_test.cpp") ? " is dir" : " not dir")
|
||||
<< endl;
|
||||
|
||||
filesys::remove("bam");
|
||||
cout << "removing directory 'bam'" << endl;
|
||||
@ -74,7 +82,8 @@ public:
|
||||
//other
|
||||
|
||||
cout << "Dir separator: " << filesys::getDirSeparator() << endl;
|
||||
cout << "Mod time of filesys_test.cpp" ": " << filesys::getModTime("filesys_test.cpp") << endl;
|
||||
cout << "Mod time of filesys_test.cpp" ": "
|
||||
<< filesys::getModTime("filesys_test.cpp") << endl;
|
||||
|
||||
// search path redux
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user