Browse Source

Added a pathSyntax argument to the file_separator function.

David Piuva 7 months ago
parent
commit
ffc4e4fd6a
2 changed files with 4 additions and 4 deletions
  1. 2 2
      Source/DFPSR/api/fileAPI.cpp
  2. 2 2
      Source/DFPSR/api/fileAPI.h

+ 2 - 2
Source/DFPSR/api/fileAPI.cpp

@@ -159,8 +159,8 @@ bool file_saveBuffer(const ReadableString& filename, Buffer buffer, bool mustWor
 	return true;
 }
 
-const char32_t* file_separator() {
-	return getPathSeparator(LOCAL_PATH_SYNTAX);
+const char32_t* file_separator(PathSyntax pathSyntax IMPLICIT_PATH_SYNTAX) {
+	return getPathSeparator(pathSyntax);
 }
 
 bool file_isSeparator(DsrChar c) {

+ 2 - 2
Source/DFPSR/api/fileAPI.h

@@ -77,10 +77,10 @@ namespace dsr {
 	// Shortcuts with file extensions are counted as files, not links.
 	String file_followSymbolicLink(const ReadableString &path, bool mustExist = true);
 
-	// Path-syntax: According to the local computer.
+	// Path-syntax: According to pathSyntax, or the local computer if not specified.
 	// Get a path separator for the target operating system.
 	//   Can be used to construct a file path that works for both forward and backward slash separators.
-	const char32_t* file_separator();
+	const char32_t* file_separator(PathSyntax pathSyntax IMPLICIT_PATH_SYNTAX);
 
 	// Path-syntax: This operation can handle separators given from any supported platform.
 	//   because separators will be corrected by file_optimizePath when used to access files.