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: 88

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