driver_windows.go 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. Copyright The containerd Authors.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. package driver
  14. import (
  15. "os"
  16. "github.com/containerd/continuity/sysx"
  17. )
  18. func (d *driver) Mknod(path string, mode os.FileMode, major, minor int) error {
  19. return &os.PathError{Op: "mknod", Path: path, Err: ErrNotSupported}
  20. }
  21. func (d *driver) Mkfifo(path string, mode os.FileMode) error {
  22. return &os.PathError{Op: "mkfifo", Path: path, Err: ErrNotSupported}
  23. }
  24. // Lchmod changes the mode of an file not following symlinks.
  25. func (d *driver) Lchmod(path string, mode os.FileMode) (err error) {
  26. // TODO: Use Window's equivalent
  27. return os.Chmod(path, mode)
  28. }
  29. // Readlink is forked in order to support Volume paths which are used
  30. // in container layers.
  31. func (d *driver) Readlink(p string) (string, error) {
  32. return sysx.Readlink(p)
  33. }