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

behavior of exists/isFile/isDir on mounts #70

Open
backbone87 opened this issue Apr 25, 2013 · 7 comments
Open

behavior of exists/isFile/isDir on mounts #70

backbone87 opened this issue Apr 25, 2013 · 7 comments

Comments

@backbone87
Copy link
Member

Several use cases... example structure:

  • / <- LocalAdapter A
  • /fileA1 <- file of A
  • /dirA1 <- dir of A
  • /dirA2 <- dir of A, LocalAdapter B mounted onto
  • /dirA2/fileB1 <- file of B
  • /dirA2/dirB1 <- dir of B
  • /dirV1 <- LocalAdapter C mounted onto, does not exists in A
  • /dirV1/fileC1 <- file of C
  • /dirV1/dirC1 <- dir of C

What happens when:

  • exists dirV1 / isDirectory dirV1
@tristanlins
Copy link
Member

A mount point like dirV1 exists in virtual environment and per definition is it a directory.

@backbone87
Copy link
Member Author

Ok, and if we change the structure to:

  • /dirV1 <- does not exists in A
  • /dirV1/dirV2 <- LocalAdapter C mounted onto, does not exists in A
  • /dirV1/dirV2/fileC1 <- file of C
  • /dirV1/dirV2/dirC1 <- dir of C

What should exists dirV1 and exists dirV1/dirV2 say now?

@tristanlins
Copy link
Member

you cannot move parent paths of mounts because it would be an implicit move of a mount that is forbidden ;-)

sry, this is wrong. You can rename the parents in a unix fs, the mount path changes with moves.

@backbone87
Copy link
Member Author

this is not about moving, that is the setup according to a possible configuration

@tristanlins
Copy link
Member

exists say true on both, because dirV1 must be exists "virtual" otherwise you can't iterate over it ;-)

@backbone87
Copy link
Member Author

What happens on touch('dirV1/fileA5')

@tristanlins
Copy link
Member

I would implicit make a mkdir to dirV1, because we suggest that it is a real directory, even it is only virtual by the mount.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants