32 testInvariant ()
const
39 DiskListSRM (
const std::string& val_dir)
48 DiskListSRM (
const std::string& val_dir,
const std::string& val_prefix)
64 std::string::size_type split1 =
m_list.find (
'\n');
65 if (split1 == std::string::npos)
72 std::string::size_type split1 =
m_list.find (
'\n');
73 if (split1 == std::string::npos)
76 const std::string line =
m_list.substr (0, split1);
80 std::string::size_type split2 = line.rfind (
'/', line.size()-2);
81 if (split2 != std::string::npos)
83 m_file = line.substr (split2 + 1);
99 std::string DiskListSRM ::
121 std::string DiskListSRM ::
#define RCU_CHANGE_INVARIANT(x)
#define RCU_NEW_INVARIANT(x)
#define RCU_READ_INVARIANT(x)
DiskListSRM(const std::string &val_dir)
make the listing for the given directory
bool m_isDir
whether this is a directory
std::string m_dir
the directory we are reading
std::string m_file
the last file we read
std::string m_list
the result of the directory listing
std::string m_prefix
the directory from with to read actual files
DiskList()
standard constructor
std::string exec_read(const std::string &cmd)
effects: execute the given command and return the output returns: the output of the command guarantee...
This module provides a lot of global definitions, forward declarations and includes that are used by ...