diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-11-19 04:14:48 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-19 01:14:48 -0800 |
| commit | b59451020eee59cd52e4d8231360ebed4fc59adb (patch) | |
| tree | a5a77794097ee99bbef91b8f28be8788284e7736 /source/slang/slang-options.cpp | |
| parent | ac41b9956681d54f4487ff06922017f2753d0c45 (diff) | |
File system refactor (#1611)
* #include an absolute path didn't work - because paths were taken to always be relative.
* WIP FileSystem refactor.
* Made loadFile load the file in binary mode.
* Fixed some comments.
Fixed typo in RelativePath - not used 'fixedPath'.
Diffstat (limited to 'source/slang/slang-options.cpp')
| -rw-r--r-- | source/slang/slang-options.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp index 6a5b43876..60d41ee5c 100644 --- a/source/slang/slang-options.cpp +++ b/source/slang/slang-options.cpp @@ -529,7 +529,7 @@ struct OptionsParser SlangPathType pathType; if (SLANG_SUCCEEDED(Path::getPathType(dirPath, &pathType)) && pathType == SLANG_PATH_TYPE_DIRECTORY) { - fileSystem = new RelativeFileSystem(OSFileSystemExt::getSingleton(), dirPath); + fileSystem = new RelativeFileSystem(OSFileSystem::getExtSingleton(), dirPath); } } @@ -557,7 +557,7 @@ struct OptionsParser SlangPathType pathType; if (SLANG_SUCCEEDED(Path::getPathType(dirPath, &pathType)) && pathType == SLANG_PATH_TYPE_DIRECTORY) { - dirFileSystem = new RelativeFileSystem(OSFileSystemExt::getSingleton(), dirPath, true); + dirFileSystem = new RelativeFileSystem(OSFileSystem::getExtSingleton(), dirPath, true); } } @@ -907,13 +907,13 @@ struct OptionsParser } else if (name == "load-file") { - // OSFileSystem just implements loadFile interface, so will be wrapped with CacheFileSystem internally - spSetFileSystem(compileRequest, OSFileSystem::getSingleton()); + // 'Simple' just implements loadFile interface, so will be wrapped with CacheFileSystem internally + spSetFileSystem(compileRequest, OSFileSystem::getLoadSingleton()); } else if (name == "os") { - // OSFileSystemExt implements the ISlangFileSystemExt interface - and will be used directly - spSetFileSystem(compileRequest, OSFileSystemExt::getSingleton()); + // 'Immutable' implements the ISlangFileSystemExt interface - and will be used directly + spSetFileSystem(compileRequest, OSFileSystem::getExtSingleton()); } else { |
