-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Handle readonly files #199
Comments
I disagree that some files should be invisible you have the right to see them... but an error should be thrown when you try to open ? |
I meant if the user doesn't have rights to see them he should not see them. |
Then it's the directory that does not have read access and thus you won't be able to get to the file at all... Otherwise I can see a no permission file with ls without any problems: |
PRs are welcomed. |
Would you rather have the fs.modes for the filestat (i.e bitmasks) or easier API like
|
@epatpol Could you check how VS Code handle it? They don't seem to expose such apis, maybe we are overthinking it. |
In theia 1.36, I set some files to read only on the file system with chmod, and all the resource, filestat, etc. properties all still say that it's not read-only. It looks to me like theia/packages/filesystem/src/node/disk-file-system-provider.ts Lines 151 to 164 in 4539753
I think this issue should be reopened. |
This issue will be resolved by #12354 instead. |
FileStat
should have access flags. There should be utility methods to check flags on read, write and execute accessFileTreeModel
should mark file stat nodes without read access as invisibleResource
should have an explicit optionalisReadonly
property with default based on the presence ofResource.save
method. There should be a utility function to check it.FileResource
should useFileStat
flags to implementisReadonly
propertyResource.isReadonly(resource)
to mark editors readonly or notThe text was updated successfully, but these errors were encountered: