changes_windows.go 469 B

1234567891011121314151617181920
  1. package archive
  2. import (
  3. "github.com/docker/docker/pkg/system"
  4. )
  5. func statDifferent(oldStat *system.StatT, newStat *system.StatT) bool {
  6. // Don't look at size for dirs, its not a good measure of change
  7. if oldStat.ModTime() != newStat.ModTime() ||
  8. oldStat.Mode() != newStat.Mode() ||
  9. oldStat.Size() != newStat.Size() && !oldStat.IsDir() {
  10. return true
  11. }
  12. return false
  13. }
  14. func (info *FileInfo) isDir() bool {
  15. return info.parent == nil || info.stat.IsDir()
  16. }