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(oli): oli stat should show path as specified by users #2842

Merged
merged 1 commit into from Aug 10, 2023

Conversation

sarutak
Copy link
Member

@sarutak sarutak commented Aug 10, 2023

Related issue: fix #2841

This PR proposes to change oli stat to show the result of path field like as Linux's stat.
Before this change, when we run oli stat for a path, the root is omitted.

$ oli stat /path/to/file
path: path/to/file
size: 6307
type: file
last-modified: 2023-08-07 22:31:52.987908713 UTC

After this change, the root is prepended.

$ oli stat /path/to/file
path: path/to/file
size: 6307
type: file
last-modified: 2023-08-07 22:31:52.987908713 UTC

Also, a path are shown as specified by users like Linux's stat does.

$ stat ./myfile
  File: ./myfile
  Size: 6307      	Blocks: 16         IO Block: 4096   regular file
Device: 10304h/66308d	Inode: 1328196138  Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/     kou)   Gid: ( 1000/     kou)
Access: 2023-08-10 04:48:01.320407752 +0900
Modify: 2023-08-08 07:31:52.987908713 +0900
Change: 2023-08-08 07:31:52.987908713 +0900
 Birth: -

Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Xuanwo Xuanwo merged commit f17dc09 into apache:main Aug 10, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

oli stat should show path as specified by users
2 participants