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

feat: add ensureLink/ensureLinkSync for fs #353

Merged
merged 4 commits into from Apr 22, 2019

Conversation

2 participants
@axetroy
Copy link
Contributor

commented Apr 22, 2019

part of #261.
ref: #268.

@axetroy axetroy referenced this pull request Apr 22, 2019

Closed

implement fs-extra api for fs modules #261

12 of 13 tasks complete
const destFilePathType = getFileInfoType(destStatInfo);
if (destFilePathType !== PathType.file) {
throw new Error(
`Ensure path exists, expected 'file', got '${destFilePathType}'`

This comment has been minimized.

Copy link
@axetroy

axetroy Apr 22, 2019

Author Contributor

Hard links don't have a specific type, so we can only use it as file.

* Ensures that the hard link exists.
* If the directory structure does not exist, it is created.
*
* @param src the source file path. directory are not allow.

This comment has been minimized.

Copy link
@axetroy

axetroy Apr 22, 2019

Author Contributor

hard link does not support for the directory.

This comment has been minimized.

Copy link
@ry

ry Apr 22, 2019

Contributor

Can you add a TODO and/or issue for this?

This comment has been minimized.

Copy link
@axetroy

axetroy Apr 22, 2019

Author Contributor

the system not support. This is not possible.

https://askubuntu.com/questions/210741/why-are-hard-links-not-allowed-for-directories

So I think todo is meaningless

This comment has been minimized.

Copy link
@ry

ry Apr 22, 2019

Contributor

Ah ok. I didn’t know that.

Please change “directory are not allow” to “Directory hard links are not allowed”

This comment has been minimized.

Copy link
@ry

ry Apr 22, 2019

Contributor

Ah ok. I didn’t know that.

Please change “directory are not allow” to “Directory hard links are not allowed”

axetroy added some commits Apr 22, 2019

@ry

ry approved these changes Apr 22, 2019

Copy link
Contributor

left a comment

LGTM

@ry ry merged commit 45eebed into denoland:master Apr 22, 2019

2 checks passed

denoland.deno_std #20190422.15 succeeded
Details
license/cla Contributor License Agreement is signed.
Details

@axetroy axetroy deleted the axetroy:ensure_link branch Apr 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.