-
Notifications
You must be signed in to change notification settings - Fork 603
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
Consider porting path.swift #392
Comments
Looks nice but all the api? |
It doesn't need to be called "path". That said, I agree it would probably be better developed as an external repo... but if someone felt strongly about it, I would allow it here : ) |
I'll start a personnal repo. Let's see how is the interest of it in the futur. |
Although I think it is not a standard. But maybe give it a try and we will see. |
@zekth That's not a very good name. 1) it uses dashes instead of underscores 2) 'swift' in the name is confusing. Better: deno_path2, deno_easypath, deno_fs2, ... |
here we go: https://github.com/zekth/deno_easypath |
Here is the case. Your code does not guarantee the order of execution await Path.home.join("foo").mkdir().copy("bar") we must rewrite like this: const actions = Path.home.join("foo").mkdir().copy("bar"); // It just push the action to the queue
await actions.exec(); // execute the actions in the queue |
I've not spotted those kind of example when i first read the documentation. You're right. Btw i think this is revelant to add also a Sync implementation. |
Improved the API and the chaining: Also waiting for #278 to land for copy and will work on LS to be as tied as path.swift. Suggestions welcome. Thanks to @bartlomieju for the contributing. |
@zekth Nice! Consider submitting it to the registry. Also, the "new EasyPath" seems kinda weird. Why not have a constructor function? import { path } from "https://deno.land/x/easypath/mod.ts";
path()
.join("foo")
.join("bar.ts")
.toString(); // output foo/bar.ts |
https://github.com/mxcl/path.swift
Seems like a nice api
The text was updated successfully, but these errors were encountered: