aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Directory.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/Directory.hh')
-rw-r--r--src/FbTk/Directory.hh7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/FbTk/Directory.hh b/src/FbTk/Directory.hh
index 8d3a42d..a553d56 100644
--- a/src/FbTk/Directory.hh
+++ b/src/FbTk/Directory.hh
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Directory.hh,v 1.3 2003/12/16 17:06:49 fluxgen Exp $ 22// $Id: Directory.hh,v 1.4 2004/04/19 18:09:14 fluxgen Exp $
23 23
24#ifndef FBTK_DIRECTORY_HH 24#ifndef FBTK_DIRECTORY_HH
25#define FBTK_DIRECTORY_HH 25#define FBTK_DIRECTORY_HH
@@ -37,6 +37,7 @@ class Directory: private FbTk::NotCopyable {
37public: 37public:
38 explicit Directory(const char *dir = 0); 38 explicit Directory(const char *dir = 0);
39 ~Directory(); 39 ~Directory();
40 const std::string &name() const { return m_name; }
40 /// go to start of filelist 41 /// go to start of filelist
41 void rewind(); 42 void rewind();
42 /// gets next dirent info struct in directory and 43 /// gets next dirent info struct in directory and
@@ -55,7 +56,11 @@ public:
55 static bool isDirectory(const std::string &filename); 56 static bool isDirectory(const std::string &filename);
56 /// @return true if a file is a regular file 57 /// @return true if a file is a regular file
57 static bool isRegularFile(const std::string &filename); 58 static bool isRegularFile(const std::string &filename);
59 /// @return true if a file executable for user
60 static bool isExecutable(const std::string &filename);
61
58private: 62private:
63 std::string m_name;
59 DIR *m_dir; 64 DIR *m_dir;
60 size_t m_num_entries; ///< number of file entries in directory 65 size_t m_num_entries; ///< number of file entries in directory
61}; 66};