diqiu50 commented on PR #5878:
URL: https://github.com/apache/gravitino/pull/5878#issuecomment-2553506584
> > @FANNG1 @jerryshao @yuqi1129 @xunliu @mchades Do you think we must
rename 'parent' , 'name' and 'path' in the function or struct names of this
interface to `file_path` `parent_file_path` and `file_name` respectively? Is it
hard to distinguish?
> > ```
> > {
> > /// Create the file by parent file id and file name and flags, if
successful, return the file handle
> > async fn create_file(&self, parent_file_id: u64, name: &str, flags:
u32) -> Result<FileHandle>;
> >
> > async fn create_file(
> > &self,
> > parent: &str,
> > name: &str,
> > flags: OpenFileFlags,
> > ) -> Result<OpenedFile>;
> > }
> >
> > #[derive(Clone, Debug)]
> > pub struct FileStat {
> > // file id for the file system.
> > pub(crate) file_id: u64,
> >
> > // parent file id
> > pub(crate) parent_file_id: u64,
> >
> > // file name
> > pub(crate) name: String,
> >
> > // file path of the fuse file system root
> > pub(crate) path: String,
> > ```
>
> I expected a clear definition of `name`. In some contexts, you may use
`name` as `file name`, and in other contexts, you may use it as `file path`.
This may make the other person confused. Using `file name` is more clear.
I agree as well. The use of 'name' in this structure and interface is now
clear. There’s no longer any ambiguity, and I’ve fixed all the parts that were
ambiguous
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]