Tizen_4.0 base
[platform/upstream/docker-engine.git] / vendor / github.com / tonistiigi / fsutil / diskwriter_windows.go
1 // +build windows
2
3 package fsutil
4
5 import (
6         "os"
7         "time"
8
9         "github.com/pkg/errors"
10 )
11
12 func rewriteMetadata(p string, stat *Stat) error {
13         return chtimes(p, stat.ModTime)
14 }
15
16 func chtimes(path string, un int64) error {
17         mtime := time.Unix(0, un)
18         return os.Chtimes(path, mtime, mtime)
19 }
20
21 // handleTarTypeBlockCharFifo is an OS-specific helper function used by
22 // createTarFile to handle the following types of header: Block; Char; Fifo
23 func handleTarTypeBlockCharFifo(path string, stat *Stat) error {
24         return errors.New("Not implemented on windows")
25 }