timemanager

package
v2.27.1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Copyright 2018-2024 CERN

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

In applying this license, CERN does not waive the privileges and immunities granted to it by virtue of its status as an Intergovernmental Organization or submit itself to any jurisdiction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
}

Manager is responsible for managing time-related attributes of nodes in a decomposed file system.

func (*Manager) CTime

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

CTime retrieves the creation time (ctime) attribute of a node. Since decomposedfs does not differentiate between ctime and mtime, it falls back to the node's modification time (mtime).

func (*Manager) DTime

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

DTime retrieves the deletion time (dtime) attribute of a node.

func (*Manager) MTime

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

MTime retrieves the modification time (mtime) attribute of a node. If the attribute is not set, it falls back to the file's last modification time.

func (*Manager) OverrideMtime

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

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

func (*Manager) SetCTime

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

SetCTime sets the creation time (ctime) attribute of a node to the given time. Since decomposedfs does not differentiate between ctime and mtime, it sets the modification time (mtime) instead.

func (*Manager) SetDTime

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

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

func (*Manager) SetMTime

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

SetMTime sets the modification time (mtime) attribute of a node to the given time. If the time is nil, the attribute is removed.

func (*Manager) SetTCTime

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

SetTCTime sets the tree creation time (tctime) attribute of a node to the given time. Since decomposedfs does not differentiate between ctime and mtime, it sets the tree modification time (tmtime) instead.

func (*Manager) SetTMTime

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

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

func (*Manager) TCTime

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

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

func (*Manager) TMTime

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

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

Jump to

Keyboard shortcuts

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