summaryrefslogtreecommitdiff
path: root/src/filename_isdir.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2018-06-23 16:47:40 +0000
committerMatthias Melcher <fltk@matthiasm.com>2018-06-23 16:47:40 +0000
commita9fd08ff5ab8bbf3838200ceace671a72627d212 (patch)
treeb7821c8f82a8ab75c682d9175c24bfaaf2993501 /src/filename_isdir.cxx
parent8c993648dbb568e35271ad4c8bd346d7eb97e69b (diff)
Doxygen: created Group to document drivers, disabled by default
Uncomment `ENABLED_SECTIONS += DriverDev` in documentation/Doxyfile.in to enable driver documentation. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12968 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/filename_isdir.cxx')
-rw-r--r--src/filename_isdir.cxx39
1 files changed, 26 insertions, 13 deletions
diff --git a/src/filename_isdir.cxx b/src/filename_isdir.cxx
index 8364742da..0b5caa4e1 100644
--- a/src/filename_isdir.cxx
+++ b/src/filename_isdir.cxx
@@ -23,19 +23,6 @@
#include <FL/filename.H>
#include <FL/Fl.H>
-/*
- * filename_isdir_quick() is a private function that checks for a
- * trailing slash and assumes that the passed name is a directory if
- * it finds one. This function is used by Fl_File_Browser and
- * Fl_File_Chooser to avoid extra stat() calls, but is not supported
- * outside of FLTK...
- */
-int Fl_System_Driver::filename_isdir_quick(const char* n) {
- // Do a quick optimization for filenames with a trailing slash...
- if (*n && n[strlen(n) - 1] == '/') return 1;
- return filename_isdir(n);
-}
-
/**
Determines if a file exists and is a directory from its filename.
\code
@@ -51,6 +38,27 @@ int fl_filename_isdir(const char* n) {
return Fl::system_driver()->filename_isdir(n);
}
+
+/**
+ * @cond DriverDev
+ * @addtogroup DriverDeveloper
+ * @{
+ */
+
+/**
+ * filename_isdir_quick() is a private function that checks for a
+ * trailing slash and assumes that the passed name is a directory if
+ * it finds one. This function is used by Fl_File_Browser and
+ * Fl_File_Chooser to avoid extra stat() calls, but is not supported
+ * outside of FLTK...
+ */
+int Fl_System_Driver::filename_isdir_quick(const char* n) {
+ // Do a quick optimization for filenames with a trailing slash...
+ if (*n && n[strlen(n) - 1] == '/') return 1;
+ return filename_isdir(n);
+}
+
+
int Fl_System_Driver::filename_isdir(const char* n) {
struct stat s;
char fn[FL_PATH_MAX];
@@ -68,6 +76,11 @@ int Fl_System_Driver::filename_isdir(const char* n) {
return !stat(n, &s) && (s.st_mode & S_IFDIR);
}
+/**
+ * @}
+ * @endcond
+ */
+
//
// End of "$Id$".
//