Design for platform dependent operations #14273
jeff-hykin
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Perspective:
I use Deno as a replacement for bash/powershell (which has been fantastic BTW). I've run into a handful of limitations like checking if a command is valid (if it's in the path), or getting the owner of a file (as a username not UID), etc.
Cases being considered :
Discussion:
There are currently a few parts of the Deno API that behave differently depending on the OS. And I think there's quite a few more in unstable that are also not universal.
I'd like to propose having a separate part of the API for OS-specific functions, while keeping the core Deno API a bit more pure in terms of cross-platform-ness. For example, instead of having chmod-permissions married to Deno, it could be under
Deno.os.unix.chmod. And instead of highly specific vanilla-linux result forlstatthe returned value could contain abstracted valuest that are likely to work cross platform.Beta Was this translation helpful? Give feedback.
All reactions