| 138 | SC::Result SC::FileSystem::init(StringSpan currentWorkingDirectory) { return changeDirectory(currentWorkingDirectory); } |
| 139 | |
| 140 | SC::Result SC::FileSystem::changeDirectory(StringSpan currentWorkingDirectory) |
| 141 | { |
| 142 | #if SC_PLATFORM_WINDOWS |
| 143 | SC_TRY(FileSystemWindowsDetail::WindowsPath::makeAbsoluteLogicalPath(currentWorkingDirectory, |
| 144 | currentDirectory.view(), currentDirectory)); |
| 145 | return Result(existsAndIsDirectory(currentDirectory.view())); |
| 146 | #else |
| 147 | SC_TRY_MSG(currentDirectory.assign(currentWorkingDirectory), |
| 148 | "FileSystem::changeDirectory - Cannot assign working directory"); |
| 149 | // TODO: Assert if path is not absolute |
| 150 | return Result(existsAndIsDirectory(".")); |
| 151 | #endif |
| 152 | } |
| 153 | |
| 154 | SC::Result SC::FileSystem::convert(const StringSpan file, StringPath& destination, |
| 155 | StringNativeBuffer<StringPath::MaxPath + 6 + 1>& transportPath, |