mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
Some checks failed
build / windows (push) Has been cancelled
build / other_os (push) Has been cancelled
build / mac_amd64 (push) Has been cancelled
build / mac_arm64 (push) Has been cancelled
build / linux (push) Has been cancelled
build / go1.24 (push) Has been cancelled
build / linux_386 (push) Has been cancelled
build / lint (push) Has been cancelled
build / android-all (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/386 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/amd64 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/arm/v6 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/arm/v7 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/arm64 (push) Has been cancelled
Build & Push Docker Images / Merge & Push Final Docker Image (push) Has been cancelled
* Adds "aix/ppc64" to the cross-compile target list. * Including AIX in the build tag of "metadata_other.go". * Excluding AIX from the main ncdu build tags. * Marking AIX as an unsupported platform for ncdu. * Excluding AIX from the fallback redirect implementation. * Excluding AIX from unix build tags to avoid undefined unix.WNOHANG.
28 lines
569 B
Go
28 lines
569 B
Go
//go:build dragonfly || plan9 || js || aix
|
|
|
|
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)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
m.Set("mode", fmt.Sprintf("%0o", info.Mode()))
|
|
m.Set("mtime", info.ModTime().Format(metadataTimeFormat))
|
|
return nil
|
|
}
|