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
NAS-112721 / 21.10 / Add API call to create directories #7645
Conversation
Primary use case is to expose ability to create paths inside cluster volumes for users to share out via SMB or oher protocols.
'gid': stat.st_gid, | ||
}) | ||
except FileNotFoundError: | ||
data.update({'size': None, 'mode': None, 'acl': None, 'uid': None, 'gid': None}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a third party here, who knows nothing about cluster, but what does this mean, haven't we just created this path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It means that I copy-pasted some things without thinking.
'type': 'DIRECTORY', | ||
} | ||
|
||
stat = p.stat() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can move this call just below mkdir
and have data
in a single dictionary declaration
Int('mode', required=True, null=True), | ||
Bool('acl', required=True, null=True), | ||
Int('uid', required=True, null=True), | ||
Int('gid', required=True, null=True), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why null=True
, can these be null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy-paste. I'll just change to Ref the path_entry from filesystem.listdir, which was the intention to begin with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Primary use case is to expose ability to create paths inside
cluster volumes for users to share out via SMB or other
file sharing protocols.
Return value is same as entry from filesystem.listdir.