From b59451020eee59cd52e4d8231360ebed4fc59adb Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 19 Nov 2020 04:14:48 -0500 Subject: 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'. --- source/core/slang-io.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/core/slang-io.h') diff --git a/source/core/slang-io.h b/source/core/slang-io.h index 492723602..3a5510566 100644 --- a/source/core/slang-io.h +++ b/source/core/slang-io.h @@ -126,6 +126,11 @@ namespace Slang /// @param path Path to extract first element from /// @return The first element of the path, or empty static UnownedStringSlice getFirstElement(const UnownedStringSlice& path); + + /// Remove a file or directory at specified path. The directory must be empty for it to be removed + /// @param path + /// @return SLANG_OK if file or directory is removed + static SlangResult remove(const String& path); }; // Helper class to clean up temporary files on dtor -- cgit v1.2.3