Demonstrate Path Class ======================== Path::fileSpec(".","temp.txt") = ./temp.txt Path::getPath("./temp.txt") = ./ Path::getFullFileSpec("./temp.txt") = /home/jim/NetBeansProjects/FileSystem/temp.txt Path::getName("./temp.txt") = temp.txt Path::getExt("./temp.txt") = txt Path::toUpper("temp.txt") = TEMP.TXT Path::toLower("Temp.Txt") = temp.txt Demonstrate Directory class ============================= current directory is: /home/jim/NetBeansProjects/FileSystem It contains files: FileSystem.h Makefile temp anothertest.txt FileSystem.cpp .dep.inc test.txt .directory run.dat and contains directories: nbproject dst dist src build files residing in /home/jim/hgCode/FileSystem FileSystem.h UnitTest.h FileSystem.cpp test.txt .directory run.dat FileSystemTest.cpp *.txt files residing in /home/jim/hgCode/FileSystem test.txt FileSystem.* files residing in /home/jim/hgCode/FileSystem FileSystem.h FileSystem.cpp directories residing in /home/jim/hgCode/FileSystem .hg Demonstrate FileInfo Class Operations ======================================= current path is "/home/jim/NetBeansProjects/FileSystem name: FileSystem.h date: 06/06/2012 08:20:07 date: 06/06/2012 date: 08:20:07 size: 7014 bytes is not archive is not compressed is not directory is not encrypted is not hidden is normal is not offline is readonly is not system is not temporary FileSystem.h == FileSystem.h FileSystem.h >= FileSystem.h FileSystem.h != FileSystem.cpp FileSystem.h >= FileSystem.cpp FileSystem.h is smaller than FileSystem.cpp FileSystem.h is earlier than FileSystem.cpp Demonstrate File class operations =================================== copying: /home/jim/NetBeansProjects/FileSystem/src/filesystem to: /home/jim/NetBeansProjects/FileSystem/dst/filesystem reading block of 1024 bytes writing block of 1024 bytes reading block of 1024 bytes writing block of 1024 bytes reading block of 1024 bytes writing block of 1024 bytes reading block of 1024 bytes writing block of 1024 bytes reading block of 1024 bytes ---- many lines omitted ---- reading block of 1024 bytes writing block of 1024 bytes reading block of 33 bytes writing block of 33 bytes Please enter, on the command line, a filename to process. Processing file FileSystem.cpp -------------------------------- ///////////////////////////////////////////////////////////////////////////// // FileSystem.cpp - Support file and directory operations // // ver 2.0 // // Language: Visual C++, Visual Studio 2010 // // Platform: Dell XPS 8300, Core i7, Windows 7 SP1 // // Application: Summer Projects, 2012 // // Author: Jim Fawcett, CST 4-187, Syracuse University // // (315) 443-3948, jfawcett@twcny.rr.com // ///////////////////////////////////////////////////////////////////////////// Processing file FileSystem.h ------------------------------ #ifndef FILEHANDLER_H #define FILEHANDLER_H ///////////////////////////////////////////////////////////////////////////// // FileSystem.h - Support file and directory operations // // ver 2.0 // // Language: Visual C++, Visual Studio 2010 // // Platform: Dell XPS 8300, Core i7, Windows 7 SP1 // // Application: Summer Projects, 2012 // // Author: Jim Fawcett, CST 4-187, Syracuse University // // (315) 443-3948, jfawcett@twcny.rr.com // Processing file test.txt -------------------------- first line second line third and last line Can't open file foobar Here's what the program can't find: /home/jim/NetBeansProjects/FileSystem/foobar writing to anothertest.txt ---------------------------- first line second line third and last line Handouts\UnfundedProjects\FawcettProjects-2012\Linux\FileSystem