summaryrefslogtreecommitdiff
path: root/indra/llcommon/llfile.h
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@lindenlab.com>2008-06-02 21:14:31 +0000
committerBryan O'Sullivan <bos@lindenlab.com>2008-06-02 21:14:31 +0000
commit9db949eec327df4173fde3de934a87bedb0db13c (patch)
treeaeffa0f0e68b1d2ceb74d460cbbd22652c9cd159 /indra/llcommon/llfile.h
parent419e13d0acaabf5e1e02e9b64a07648bce822b2f (diff)
svn merge -r88066:88786 svn+ssh://svn.lindenlab.com/svn/linden/branches/cmake-9-merge
dataserver-is-deprecated for-fucks-sake-whats-with-these-commit-markers
Diffstat (limited to 'indra/llcommon/llfile.h')
-rw-r--r--indra/llcommon/llfile.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/llcommon/llfile.h b/indra/llcommon/llfile.h
index a8a6965c0d..bd51ac2aa9 100644
--- a/indra/llcommon/llfile.h
+++ b/indra/llcommon/llfile.h
@@ -50,15 +50,23 @@ typedef FILE LLFILE;
#define USE_LLFILESTREAMS 0
#endif
+#include <sys/stat.h>
#if LL_WINDOWS
// windows version of stat function and stat data structure are called _stat
typedef struct _stat llstat;
#else
-#include <sys/stat.h>
typedef struct stat llstat;
#endif
+#ifndef S_ISREG
+# define S_ISREG(x) (((x) & S_IFMT) == S_IFREG)
+#endif
+
+#ifndef S_ISDIR
+# define S_ISDIR(x) (((x) & S_IFMT) == S_IFDIR)
+#endif
+
class LLFile
{
public:
@@ -74,7 +82,10 @@ public:
static int remove(const char* filename);
static int rename(const char* filename,const char* newname);
static int stat(const char* filename,llstat* file_status);
+ static bool isdir(const char* filename);
+ static bool isfile(const char* filename);
static LLFILE * _Fiopen(const char *filename, std::ios::openmode mode,int); // protection currently unused
+ static const char * tmpdir();
};