Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-02-02 13:23:00 +0000
committerStijn Buys <ingar@osirion.org>2008-02-02 13:23:00 +0000
commitcdc5a69a108654ff378839e8cf93669de31ff9c5 (patch)
tree10bdc47d0d51485f49387bee3aeae7037c47df6e /src/filesystem
parent1765b93250ac3b89947c3da7f0c7266a910367c9 (diff)
removed libcommon
modularized client and server
Diffstat (limited to 'src/filesystem')
-rw-r--r--src/filesystem/Makefile.am3
-rw-r--r--src/filesystem/file.cc2
-rw-r--r--src/filesystem/filesystem.cc2
-rw-r--r--src/filesystem/path.cc18
4 files changed, 7 insertions, 18 deletions
diff --git a/src/filesystem/Makefile.am b/src/filesystem/Makefile.am
index 2eb094f..a490cd3 100644
--- a/src/filesystem/Makefile.am
+++ b/src/filesystem/Makefile.am
@@ -2,8 +2,7 @@ METASOURCES = AUTO
libfilesystem_la_SOURCES = file.cc filesystem.cc inifile.cc path.cc
libfilesystem_la_LDFLAGS = -avoid-version -no-undefined
-libfilesystem_la_LIBADD = $(top_builddir)/src/sys/libsys.la \
- $(top_builddir)/src/common/libcommon.la
+libfilesystem_la_LIBADD = $(top_builddir)/src/sys/libsys.la
noinst_LTLIBRARIES = libfilesystem.la
noinst_HEADERS = file.h filesystem.h inifile.h path.h
diff --git a/src/filesystem/file.cc b/src/filesystem/file.cc
index 4e68bbd..cd6ae1b 100644
--- a/src/filesystem/file.cc
+++ b/src/filesystem/file.cc
@@ -5,7 +5,7 @@
*/
// project headers
-#include "common/common.h"
+#include "sys/sys.h"
#include "filesystem/filesystem.h"
namespace filesystem {
diff --git a/src/filesystem/filesystem.cc b/src/filesystem/filesystem.cc
index 5ae4da7..b720198 100644
--- a/src/filesystem/filesystem.cc
+++ b/src/filesystem/filesystem.cc
@@ -6,7 +6,7 @@
// project headers
#include "filesystem/filesystem.h"
-#include "common/common.h"
+#include "sys/sys.h"
std::string filesystem::datadir = "";
std::string filesystem::homedir = "";
diff --git a/src/filesystem/path.cc b/src/filesystem/path.cc
index ac780c4..c090791 100644
--- a/src/filesystem/path.cc
+++ b/src/filesystem/path.cc
@@ -6,13 +6,7 @@
// project headers
#include "filesystem/path.h"
-#include "common/common.h"
-
-#ifdef _WIN32
-#include <dlfcn.h>
-#else
-#include <sys/stat.h>
-#endif
+#include "sys/sys.h"
namespace filesystem {
@@ -21,14 +15,10 @@ void Path::create(std::string path) {
if (tmp[tmp.size()-1] == '/')
tmp = tmp.substr(0, tmp.size() - 1);
-#ifdef _WIN32
- mkdir(tmp.c_str());
-#else
- if (!mkdir(tmp.c_str(), 0777))
- con_warn << "Could not create directory " << tmp << std::endl;
+ if (!sys::mkdir(tmp.c_str()))
+ con_warn << "could not create directory " << tmp << std::endl;
else
- con_debug << "Path created " << tmp << std::endl;
-#endif
+ con_debug << "directory created " << tmp << std::endl;
}
bool Path::exists(std::string path) {