A few documentation questions about path and seperator
See original GitHub issueHi all, I have a few questions about the current implementations:
- I noticed there is a
sep
attribute inAbstractFileSystem
. But all built-in implementations use/
, even forLocalFileSystem
on windows, right? - Should paths passed into
fs.xxx
have protocols? For example, I saw some implementations calls_strip_protocol
for paths, and some don’t (for example, other methods inArrowFsWrapper
calls it, but not forls
see arrow.py and #1086). Should they be consistent? If they should, we need to fix current implementations and document this change somewhere.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
File path formats on Windows systems | Microsoft Learn
In this article, learn about file path formats on Windows systems, such as traditional DOS paths, DOS device paths, and universal naming ...
Read more >When should I use File.separator and when File.pathSeparator?
File.pathSeparator is used to separate individual file paths in a list of file paths. Consider on windows, the PATH environment variable. You use...
Read more >Paths explained: Absolute, relative, UNC, and URL—Help
Relative paths are relative to a current directory, which is the location of the saved document or toolbox. UNC paths. UNC stands for...
Read more >Chapter 8 – Reading and Writing Files
On Windows, paths are written using backslashes (\) as the separator between folder names. OS X and Linux, however, use the forward slash...
Read more >Change path separator in currfile - TeX - LaTeX Stack Exchange
This might be done, e.g., via writing directives for defining a macro to .aux-file and checking whether the macro in question is defined:...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Correct,
sep
is always “/”. Originally, we hados.sep
for the local filesystem, but found this unworkable, so the attribute is just a hangover and not useful. I don’t think it’s referenced anywhere.Seconds, filesystems should normally call _strip_protocol and allow full URLs passed in. You are welcome to make a PR to HDFS to make sure this works there too.
Yes, and probably this belongs in AbstractFileSystem’s docstrings