|
|
1.1 ! root 1: /* ! 2: Copyright (c) 2008 TrueCrypt Foundation. All rights reserved. ! 3: ! 4: Governed by the TrueCrypt License 2.4 the full text of which is contained ! 5: in the file License.txt included in TrueCrypt binary and source code ! 6: distribution packages. ! 7: */ ! 8: ! 9: #include <sys/stat.h> ! 10: #include "System.h" ! 11: #include "Platform/Directory.h" ! 12: #include "Platform/SystemException.h" ! 13: ! 14: namespace TrueCrypt ! 15: { ! 16: void Directory::Create (const DirectoryPath &path) ! 17: { ! 18: string p = path; ! 19: throw_sys_sub_if (mkdir (p.c_str(), S_IRUSR | S_IWUSR | S_IXUSR) == -1, p); ! 20: } ! 21: ! 22: DirectoryPath Directory::AppendSeparator (const DirectoryPath &path) ! 23: { ! 24: wstring p (path); ! 25: ! 26: if (p.find_last_of (L'/') + 1 != p.size()) ! 27: return p + L'/'; ! 28: ! 29: return p; ! 30: } ! 31: ! 32: FilePathList Directory::GetFilePaths (const DirectoryPath &path) ! 33: { ! 34: throw NotImplemented (SRC_POS); ! 35: } ! 36: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.