X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdbos%2Fworkdir%2Ffilesystem%2FDirectory.cpp;fp=example%2Fdbos%2Fworkdir%2Ffilesystem%2FDirectory.cpp;h=0000000000000000000000000000000000000000;hb=851ff2962362fd5bad874e8ed91445b296eaca24;hp=e22c859e5ae1a90d9177a0638c1eecd2006597d7;hpb=78be86969d2f26a9084b0c4af6ce43d5fa4ed3fd;p=anna.git diff --git a/example/dbos/workdir/filesystem/Directory.cpp b/example/dbos/workdir/filesystem/Directory.cpp deleted file mode 100644 index e22c859..0000000 --- a/example/dbos/workdir/filesystem/Directory.cpp +++ /dev/null @@ -1,69 +0,0 @@ -// ANNA - Anna is Not Nothingness Anymore // -// // -// (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo // -// // -// See project site at http://redmine.teslayout.com/projects/anna-suite // -// See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE // - - -#include - -#include "Directory.hpp" -#include "File.hpp" - -using namespace std; -using namespace anna; -using namespace workdir; - -void filesystem::Directory::print (const int level) const - throw () -{ - filesystem::Directory::const_child_iterator ii; - filesystem::Directory::const_child_iterator maxii = child_end (); - const filesystem::Directory* auxd; - const filesystem::File* auxf; - int row = 0; - bool hasDirectories = false; - - for (int space = 0; space < level; space ++) - cout << " "; - - cout << getName () << "/ (" << child_size () << "): " << endl; - - /* - * Recorre todas las dependencias y visualiza primero todos los ficheros - */ - for (ii = child_begin (); ii != maxii; ii ++) { - auxf = filesystem::File::down_cast (filesystem::Directory::child (ii)); - - if (auxf == NULL) { - hasDirectories = true; - continue; - } - - if (row == 0) { - for (int space = 0; space < level + 1; space ++) - cout << " "; - } - - auxf->print (level + 1); - - if (++ row == 5) { - cout << endl; - row = 0; - } - } - - if (row > 0) - cout << endl; - - /* - * Trata los directorios recursivamente - */ - for (ii = child_begin (); hasDirectories == true && ii != maxii; ii ++) { - auxd = filesystem::Directory::down_cast (filesystem::Directory::child (ii)); - - if (auxd != NULL) - auxd->print (level + 1); - } -}