mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-10-31 16:13:45 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
		
			284 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			284 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| // +build !linux
 | |
| 
 | |
| package fsutil
 | |
| 
 | |
| import (
 | |
| 	"os"
 | |
| 	"time"
 | |
| )
 | |
| 
 | |
| func chtimes(path string, un int64) error {
 | |
| 	mtime := time.Unix(0, un)
 | |
| 	fi, err := os.Lstat(path)
 | |
| 	if err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 	if fi.Mode()&os.ModeSymlink != 0 {
 | |
| 		return nil
 | |
| 	}
 | |
| 	return os.Chtimes(path, mtime, mtime)
 | |
| }
 | 
