diff options
author | fluxgen <fluxgen> | 2004-04-19 18:09:15 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2004-04-19 18:09:15 (GMT) |
commit | 95c20b15f90ae8b406b2c9a4e6eae4e3e8d0c77f (patch) | |
tree | 6756ae07f904d0a82832d08bb500e694eb651c50 /src/FbTk/Directory.hh | |
parent | bb2f1c87136c930f1a91ec8864890a5edb2c04f2 (diff) | |
download | fluxbox-95c20b15f90ae8b406b2c9a4e6eae4e3e8d0c77f.zip fluxbox-95c20b15f90ae8b406b2c9a4e6eae4e3e8d0c77f.tar.bz2 |
added name and isExecutable, patch from Mathias Gumz
Diffstat (limited to 'src/FbTk/Directory.hh')
-rw-r--r-- | src/FbTk/Directory.hh | 7 |
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 { | |||
37 | public: | 37 | public: |
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 | |||
58 | private: | 62 | private: |
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 | }; |