Add vignette with comparison tables for base R vs fs#168
Add vignette with comparison tables for base R vs fs#168jimhester merged 7 commits intor-lib:masterfrom
Conversation
|
FWIW |
|
This is what I used actually. Does the output looks weird? |
jimhester
left a comment
There was a problem hiding this comment.
Thanks this is looking good!
I think we should put fs as the first column in the table rather than base, so it woudl be fs, base, shell.
|
|
||
| | base | fs | shell | | ||
| |-------------------------------------+---------------------------------------------+------------------------------------| | ||
| | *No easy way* | `file_chmod("/path", "mode")` | `chmod mode /path` | |
There was a problem hiding this comment.
Ah could not find this one!
What is a good PR process: if I added this in the last commit, do I click "Resolve conversation" or do I leave it to the Reviewer?
| | base | fs | shell | | ||
| |--------------------------------------------------+------------------------------------------------------+-------------------------------| | ||
| | `file.path("top_dir", "nested_dir", "file.ext")` | `path("top_dir", "nested_dir", "file", ext = "ext")` | `top_dir/nested_dir/file.ext` | | ||
| | `path.expand()` | `path_expand("~/path")` | *Need scripting.* | |
There was a problem hiding this comment.
maybe the shell one could be realpath -m -s ~/path. realpath is a GNU specific thing, but seems reasonable to use here.
There was a problem hiding this comment.
It would also be nice to include path_real() and path_norm() as additional entries here, but I can do that later if needed.
There was a problem hiding this comment.
Added realpath -m -s ~/path (could not try it on this machine).
Maybe it is better that you add path_real() and path_norm(). I am not sure what would be the fs and shell short equivalents.
Add realname as a shell equivalent to fs::path_expand Add Sys.chmod as base equivalent to fs::file_chmod
|
Thanks, Then I will merge this and can flesh out anything remaining (like |
|
Ok thanks, I added a line to NEWS. I pushed the change but not sure if I shall have synced my fork first as I am now a few commits behind the original (sorry first time contribution...). |
|
Thanks for your work on this, looks great! |
|
And thank you for coming to the tidyverse developer day! |
This PR contains a vignette with comparison tables for base R vs fs.
As @cderv mentioned on #156, there are probably more details that would be relevant for functions like
fs_path().Since this is the first vignette for this package (that's my understanding...), it modifies also a bit the
DESCRIPTIONand.gitignore. I tried to keep only what seems standard on other packages but not sure if I did well.