1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-10 05:13:45 +00:00

local: add --local-time-type to use mtime/atime/btime/ctime as the time

Fixes #7484
This commit is contained in:
Nick Craig-Wood
2023-12-08 15:26:53 +00:00
parent 854a36c4ab
commit ac6ba11d22
6 changed files with 138 additions and 2 deletions

View File

@@ -5,10 +5,17 @@ package local
import (
"fmt"
"os"
"time"
"github.com/rclone/rclone/fs"
)
// Read the time specified from the os.FileInfo
func readTime(t timeType, fi os.FileInfo) time.Time {
return fi.ModTime()
}
// Read the metadata from the file into metadata where possible
func (o *Object) readMetadataFromFile(m *fs.Metadata) (err error) {
info, err := o.fs.lstat(o.path)