]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/fileutils.h
Convert InspIRCd::SetSignals to a static function.
[user/henk/code/inspircd.git] / include / fileutils.h
index 89f92f97fea2aa426c90579cb0356d9def14a1f2..e50cc8c34e0738539ffbb54501073e5ca04dc557 100644 (file)
@@ -79,6 +79,14 @@ public:
         */
        static std::string GetFileName(const std::string& path);
 
+       /** Gets a list of files which exist in the specified directory.
+        * @param directory The directory to retrieve files from.
+        * @param entries A vector which entries will be added to.
+        * @param match If defined then a glob match for files to be matched against.
+        * @return True if the directory could be opened; otherwise false.
+        */
+       static bool GetFileList(const std::string& directory, std::vector<std::string>& entries, const std::string& match = "*");
+
        /** Determines whether the given path starts with a Windows drive letter.
         * @param path The path to validate.
         * @returns True if the path begins with a Windows drive letter; otherwise, false.