aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/Filesystem/Filesystem.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-10-19 08:36:44 +0800
committerchai <chaifix@163.com>2018-10-19 08:36:44 +0800
commit7d5f055547e70fa93ee9ac944e62f8d657b9dc55 (patch)
tree081782a1541854db4b8eb69c4b43081f52711286 /src/libjin/Filesystem/Filesystem.cpp
parent02dd1f38008594048f0e28bad01e7c6d18844198 (diff)
*修改文件名
Diffstat (limited to 'src/libjin/Filesystem/Filesystem.cpp')
-rw-r--r--src/libjin/Filesystem/Filesystem.cpp67
1 files changed, 0 insertions, 67 deletions
diff --git a/src/libjin/Filesystem/Filesystem.cpp b/src/libjin/Filesystem/Filesystem.cpp
deleted file mode 100644
index 8dce5a3..0000000
--- a/src/libjin/Filesystem/Filesystem.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-#include "filesystem.h"
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h> /* defines FILENAME_MAX */
-
-namespace jin
-{
- namespace filesystem
- {
-
- Filesystem* Filesystem::fs = 0;
-
- Filesystem::Filesystem()
- {
- S = smtnewshared();
- }
-
- Filesystem* Filesystem::get()
- {
- return fs ? fs : (fs = new Filesystem());
- }
-
- void Filesystem::mount(const char * path)
- {
- int err = smtmount(S, path);
- if (err)
- {
- printf("%s mounted path %s", smterrstr(err), path);
- exit(1);
- }
- }
-
- int Filesystem::read(const char* path, Buffer* buffer)
- {
- buffer->data = smtread(S, path, &buffer->size);
- if (buffer->data == 0)
- return 0;
- return 1;
- }
-
- void* Filesystem::read(const char* path, unsigned int* len)
- {
- return smtread(S, path, len);
- }
-
- const char* Filesystem::getFull(const char* path)
- {
- return smtfullpath(S, path);
- }
-
- bool Filesystem::isDir(const char* path)
- {
- return smtisdir(S, path);
- }
-
- bool Filesystem::isFile(const char* path)
- {
- return smtisreg(S, path);
- }
-
- bool Filesystem::exists(const char* path)
- {
- return smtexists(S, path) == 0;
- }
-
- } // namespace filesystem
-} // namespace jin \ No newline at end of file