diff options
Diffstat (limited to 'src/libjin/Filesystem/Filesystem.cpp')
-rw-r--r-- | src/libjin/Filesystem/Filesystem.cpp | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/src/libjin/Filesystem/Filesystem.cpp b/src/libjin/Filesystem/Filesystem.cpp index 3f91274..b8faed7 100644 --- a/src/libjin/Filesystem/Filesystem.cpp +++ b/src/libjin/Filesystem/Filesystem.cpp @@ -5,63 +5,63 @@ namespace jin { -namespace filesystem -{ + namespace filesystem + { - Filesystem* Filesystem::fs = 0; + Filesystem* Filesystem::fs = 0; - Filesystem::Filesystem() - { - S = smtnewshared(); - } + Filesystem::Filesystem() + { + S = smtnewshared(); + } - Filesystem* Filesystem::get() - { - return fs ? fs : (fs = new Filesystem()); - } + 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); - } - } + 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; - } + 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); - } + 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); - } + const char* Filesystem::getFull(const char* path) + { + return smtfullpath(S, path); + } - bool Filesystem::isDir(const char* path) - { - return smtisdir(S, path); - } + bool Filesystem::isDir(const char* path) + { + return smtisdir(S, path); + } - bool Filesystem::isFile(const char* path) - { - return smtisreg(S, path); - } + bool Filesystem::isFile(const char* path) + { + return smtisreg(S, path); + } - bool Filesystem::exists(const char* path) - { - return smtexists(S, path) == 0; - } + bool Filesystem::exists(const char* path) + { + return smtexists(S, path) == 0; + } -} // filesystem + } // filesystem } // jin
\ No newline at end of file |