summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-options.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2020-11-19 04:14:48 -0500
committerGitHub <noreply@github.com>2020-11-19 01:14:48 -0800
commitb59451020eee59cd52e4d8231360ebed4fc59adb (patch)
treea5a77794097ee99bbef91b8f28be8788284e7736 /source/slang/slang-options.cpp
parentac41b9956681d54f4487ff06922017f2753d0c45 (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.cpp12
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
{