timemanager

package
v2.26.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StatCTime

func StatCTime(st *syscall.Stat_t) syscall.Timespec

StatCtime returns the creation time

Types

type Manager

type Manager struct {
}

Manager is responsible for managing time-related operations on files and directories.

func (*Manager) CTime

func (m *Manager) CTime(ctx context.Context, n *node.Node) (time.Time, error)

CTime returns the creation time (ctime) of a node.

func (*Manager) DTime

func (m *Manager) DTime(ctx context.Context, n *node.Node) (tmTime time.Time, err error)

DTime returns the deletion time (dtime) of a node.

func (*Manager) MTime

func (m *Manager) MTime(ctx context.Context, n *node.Node) (time.Time, error)

MTime returns the modification time (mtime) of a node.

func (*Manager) OverrideMtime

func (m *Manager) OverrideMtime(ctx context.Context, n *node.Node, _ *node.Attributes, mtime time.Time) error

OverrideMtime overrides the modification time (mtime) of a node with the specified time.

func (*Manager) SetDTime

func (m *Manager) SetDTime(ctx context.Context, n *node.Node, t *time.Time) (err error)

SetDTime sets the deletion time (dtime) of a node to the specified time. If t is nil, the dtime attribute is removed.

func (*Manager) SetMTime

func (m *Manager) SetMTime(ctx context.Context, n *node.Node, mtime *time.Time) error

SetMTime sets the modification time (mtime) of a node to the specified time.

func (*Manager) SetTCTime

func (m *Manager) SetTCTime(ctx context.Context, n *node.Node, tmtime *time.Time) error

SetTCTime sets the tree creation time (tctime) of a node to the specified time. Since decomposedfs does not differentiate between ctime and mtime, it falls back to SetTMTime.

func (*Manager) SetTMTime

func (m *Manager) SetTMTime(ctx context.Context, n *node.Node, tmtime *time.Time) error

SetTMTime sets the tree modification time (tmtime) of a node to the specified time. If tmtime is nil, the tmtime attribute is removed.

func (*Manager) TCTime

func (m *Manager) TCTime(ctx context.Context, n *node.Node) (time.Time, error)

TCTime returns the tree creation time (tctime) of a node. Since decomposedfs does not differentiate between ctime and mtime, it falls back to TMTime.

func (*Manager) TMTime

func (m *Manager) TMTime(ctx context.Context, n *node.Node) (time.Time, error)

TMTime returns the tree modification time (tmtime) of a node. If the tmtime is not set, it falls back to the modification time (mtime).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL