Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input with / and output with both \ and / ?? #2009

Open
GnRSlash opened this issue Jan 29, 2025 · 0 comments
Open

Input with / and output with both \ and / ?? #2009

GnRSlash opened this issue Jan 29, 2025 · 0 comments

Comments

@GnRSlash
Copy link

I am trying to use it Glob 2.1.3, with my API using Dart (3.5.4 (stable)) running on Windows 11 x64 Pro like this:

      Glob glob = Glob('//server/path1/path2/path with spaces3/Template.*');
      List<FileSystemEntity> files = glob.listSync();
      for (FileSystemEntity entity in files) {
        if (entity is File) {
          arquivos.add(entity.path.split(Platform.pathSeparator).last);
        }
      }

But the result inside entity.path has a file using both separators (\ and /), like this:

//server/path1\path2\path with spaces3\Template.xlsm

This is not a spectate behavior, because this way, we don't know how to work after the glob search...
If this behavior is normal, then how should I handle the result to separate the folders and files since I don't know which separator I should use?

Thank you in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant