version 1.8, 2001/04/08 19:20:04
|
version 1.9, 2001/04/08 19:56:38
|
|
|
// Author: | // Author: |
// | // |
// $Log$ | // $Log$ |
|
// Revision 1.9 2001/04/08 19:56:38 karl |
|
// Test version |
|
// |
// Revision 1.8 2001/04/08 19:20:04 mike | // Revision 1.8 2001/04/08 19:20:04 mike |
// more TCP work | // more TCP work |
// | // |
|
|
Boolean FileSystem::removeDirectoryHier(const String& path) | Boolean FileSystem::removeDirectoryHier(const String& path) |
{ | { |
// Get list of files in the Directory | // Get list of files in the Directory |
|
ArrayDestroyer<char> p(_clonePath(path)); |
|
|
|
cout << "DEBUG RMDIR Enter " << p.getPointer() << endl; |
|
|
| |
Array<String> fileList; | Array<String> fileList; |
| |
|
|
return false; | return false; |
| |
// ATTN: Since not tested. Following is bypass | // ATTN: Since not tested. Following is bypass |
return true; |
// return true; |
| |
// for files-in-directory, delete or recall removedir | // for files-in-directory, delete or recall removedir |
// Do not yet test for boolean returns on the removes | // Do not yet test for boolean returns on the removes |
// ATTN Diagnostics still installed ks. | // ATTN Diagnostics still installed ks. |
for (Uint32 i = 0, n = fileList.getSize(); i < n; i++) | for (Uint32 i = 0, n = fileList.getSize(); i < n; i++) |
{ | { |
if (FileSystem::isDirectory(fileList[i])) |
ArrayDestroyer<char> q(_clonePath(fileList[i])); |
{ |
|
// std::cout << "DEBUG RMDIR Next " << fileList[i] << std::endl; |
// DEBUG Display of the isDirectory Call |
|
cout << "DEBUG DIR? " << i << " " << |
|
FileSystem::isDirectory(fileList[i]) << endl; |
|
|
|
if (FileSystem::isDirectory(fileList[i])){ |
|
cout << "DEBUG RMDIR Next " << q.getPointer() << endl; |
FileSystem::removeDirectoryHier(fileList[i]); | FileSystem::removeDirectoryHier(fileList[i]); |
} | } |
| |
else |
else{ |
{ |
cout << "DEBUG RMFIL " << q.getPointer() <<endl; |
// std::cout << "DEBUG RMFIL " << fileList[i] << std::endl; |
|
removeFile(fileList[i]); | removeFile(fileList[i]); |
} | } |
| |
|
|
for (Dir dir(path); dir.more(); dir.next()) | for (Dir dir(path); dir.more(); dir.next()) |
{ | { |
String name = dir.getName(); | String name = dir.getName(); |
|
cout << "DEBUG gD " << dir.getName() << " " << |
|
FileSystem::isDirectory(name) << endl; |
if (String::equal(name, ".") || String::equal(name, "..")) | if (String::equal(name, ".") || String::equal(name, "..")) |
continue; | continue; |
// cout << "DEBUG DIR = " << dir.getName() << endl; | // cout << "DEBUG DIR = " << dir.getName() << endl; |