11 #ifndef _UT_DIRUTIL_H_
12 #define _UT_DIRUTIL_H_
81 const char *basepath =
nullptr);
83 const char *basepath =
nullptr);
85 const char *basepath =
nullptr,
86 bool allow_relative_path_from_root =
true);
88 const char *basepath =
nullptr,
89 bool allow_relative_path_from_root =
true);
137 #include <sys/types.h>
146 #define EOVERFLOW 132
149 namespace {
struct ut_DirData; }
161 friend struct ut_DirData;
164 UT_API struct dirent *readdir( DIR *dirp );
165 UT_API void closedir( DIR *dirp );
170 #include <sys/types.h>
171 #include <sys/stat.h>
GT_API const UT_StringHolder filename
UT_API int UTunixFullPathSpecified(const char *name)
UT_API bool UTisRootPath(const char *filename)
GLsizei const GLchar *const * path
UT_API const UT_StringArray & UTgetAbsolutePathPrefixes()
UT_API void UTstripFileUrlPrefix(UT_String &path)
UT_API bool UTisValidDirectory(const char *path)
Returns true if the given path is a readable directory.
UT_API int UTgetRootPrefixLength(const char *filename)
UT_API void UTmakeRelativeFilePath(UT_String &path, const char *basepath=nullptr, bool allow_relative_path_from_root=true)
UT_API bool UTisHiddenFile(const char *basepath, const char *filename)
GLint GLint GLsizei GLint GLenum GLenum type
UT_API void UTaddAbsolutePathPrefix(const char *prefix, UT_AbsolutePrefixType type=Default)
UT_API void UTmakeAbsoluteFilePath(UT_String &path, const char *basepath=nullptr)
UT_API int statLastRead(dirent *dp, const char *path, UT_FileStat &file_stat)
UT_API int UTfullPathSpecified(const char *name)
GLuint const GLchar * name
UT_API bool UTfileExists(const char *path)
UT_API bool UTisRegularFile(const char *path)
Returns true if path is a regular file, without permission checks.
UT_API char * getUnixCwd(char *buffer, int maxlen)
Get the current working directory.
UT_API void UTnormalizeFilePath(UT_String &path)
UT_API bool UTisDirectory(const char *path)
Returns true if path is a directory, without permission checks.
UT_API bool UTisAbsolutePath(const char *filename)
UT_API void UTrealPath(UT_String &path)
UT_API bool UTisValidRegularFile(const char *path)