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

Should we abstract links? #275

Closed
BurtHarris opened this issue Aug 6, 2017 · 1 comment
Closed

Should we abstract links? #275

BurtHarris opened this issue Aug 6, 2017 · 1 comment

Comments

@BurtHarris
Copy link
Contributor

BurtHarris commented Aug 6, 2017

On Windows, for security reasons, the best choice for transparent directory links is usually junctions, and the best choice for transparent file links is usually hardlinks. Since that's different from Unix, perhaps vinyl-fs should expose an abstract way of creating links rather than using specific terms like symlink, hardlink, and junction.

For example, if we have an operation just called link that implements platform-specific logic in choosing the type of link, and throws if its not possible to create a logical link given the parameters passed to it.

P.S. To further complicate things, consider that Windows also has shell shortcuts; similar, but a bit different, these are sometimes called shell links. They may not enter into the same model, but it might make sense to include them: shell links can exist in the file system, and point to locations in a shell namespace inside or outside the file namespace. I know that's probably weird on Unix; they don't participate automatically in file-system name resolution but for UI purposes they are the most flexible form of links. So for example, adding a program item to the "start" menu, desktop, or the control panel is usually done with a shortcut.

@BurtHarris BurtHarris mentioned this issue Aug 6, 2017
@BurtHarris BurtHarris changed the title Should we abstract file links? Should we abstract links? Aug 6, 2017
@phated
Copy link
Member

phated commented Nov 10, 2017

Having explored this rabbit hole pretty deeply now (due to #254) - I think that something like this would need to be delegated into node core to be a proper abstraction.

The only thing we could do would be to rename our symlinks method to something more platform agnostic but I think a majority of the community using links understands the implication of the name.

@phated phated closed this as completed Nov 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants