Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

Add crtime and mtime

byunghwa.yune84fad9acfe0
diff --git a/weed/shell/command_fs_mkdir.go b/weed/shell/command_fs_mkdir.go
index 71a9daecec..11b663eec4 100644
--- a/weed/shell/command_fs_mkdir.go
+++ b/weed/shell/command_fs_mkdir.go
@@ -6,6 +6,7 @@ import (
"github.com/chrislusf/seaweedfs/weed/util"
"io"
"os"
+ "time"
)
func init() {
@@ -43,6 +44,8 @@ func (c *commandFsMkdir) Do(args []string, commandEnv *CommandEnv, writer io.Wri
Name: name,
IsDirectory: true,
Attributes: &filer_pb.FuseAttributes{
+ Mtime: time.Now().Unix(),
+ Crtime: time.Now().Unix(),
FileMode: uint32(0777 | os.ModeDir),
},
},