-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
The code snippet below:
class Program
{
static void Main(string[] args)
{
const string stringPath = @"/this/is/a/file\named\this.txt";
PurePosixPath posixPath = new(stringPath);
Console.WriteLine(posixPath.Directory);
Console.WriteLine(posixPath.Filename);
}
}
prints the following when run on my Windows machine:
/this/is/a/file/named
this.txt
Clearly it is interpreting the '\' characters as path separators. However, these are valid filename characters under Posix and I would expect the following output:
/this/is/a
file\named\this.txt
I assume this is related to running on Windows. However my understanding was that the Pure path types don't care what machine they are being run on. Being able to easily manipulate either Windows or Posix paths from a Windows machine, is what initially drew me to this library.
Metadata
Metadata
Assignees
Labels
No labels