atime

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2021 License: MIT Imports: 3 Imported by: 116 modules, 116 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

atime

GoDoc Release Software License Build Status Coverage Status Go Report Card Sourcegraph

Usage

File Access Times for #golang

Looking for ctime or btime? Checkout https://github.com/djherbis/times

Go has a hidden atime function for most platforms, this repo makes it accessible.

package main

import (
  "log"

  "github.com/djherbis/atime"
)

func main() {
  at, err := atime.Stat("myfile")
  if err != nil {
    log.Fatal(err.Error())
  }
  log.Println(at)
}

Installation

go get github.com/djherbis/atime

Documentation

Overview

Package atime provides a platform-independent way to get atimes for files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(fi os.FileInfo) time.Time

Get returns the Last Access Time for the given FileInfo

func Stat

func Stat(name string) (time.Time, error)

Stat returns the Last Access Time for the given filename

Types

This section is empty.

Jump to

Keyboard shortcuts

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