goduf-byinode_fallback.go
author Mikael Berthe <mikael@lilotux.net>
Sat, 28 Jun 2014 22:23:28 +0200
changeset 7 68375cc98f98
parent 3 d08d45871171
child 11 47e45453b705
permissions -rw-r--r--
Refactor checksum functions to reduce code duplication


// +build plan9 windows

package main

import "os"

// ByInode is a FileObjList type with a sort interface
type ByInode FileObjList

func (a ByInode) Len() int      { return len(a) }
func (a ByInode) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
func (a ByInode) Less(i, j int) bool {
	return true
}

// OSHasInodes returns true iff the O.S. uses inodes for its filesystems.
func OSHasInodes() bool {
	return false
}

// GetDevIno returns the device and inode IDs of a given file.
// This is not supported on Windows and Plan9.
func GetDevIno(fi os.FileInfo) (uint64, uint64) {
	return 0, 0 // Not supported
}