Debian Codegraph @

internal/robustio/robustio_plan9.go

raw symbols SCIP
1 // Copyright 2022 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 //go:build plan9
6
7 package robustio
8
9 import (
10 "os"
11 "syscall"
12 "time"
13 )
14
15 func getFileID(filename string) (FileID, time.Time, error) {
16 fi, err := os.Stat(filename)
17 if err != nil {
18 return FileID{}, time.Time{}, err
19 }
20 dir := fi.Sys().(*syscall.Dir)
21 return FileID{
22 device: uint64(dir.Type)<<32 | uint64(dir.Dev),
23 inode: dir.Qid.Path,
24 }, fi.ModTime(), nil
25 }