...

Source file src/github.com/containerd/continuity/driver/driver_windows.go

Documentation: github.com/containerd/continuity/driver

     1  //go:build go1.13
     2  // +build go1.13
     3  
     4  /*
     5     Copyright The containerd Authors.
     6  
     7     Licensed under the Apache License, Version 2.0 (the "License");
     8     you may not use this file except in compliance with the License.
     9     You may obtain a copy of the License at
    10  
    11         http://www.apache.org/licenses/LICENSE-2.0
    12  
    13     Unless required by applicable law or agreed to in writing, software
    14     distributed under the License is distributed on an "AS IS" BASIS,
    15     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    16     See the License for the specific language governing permissions and
    17     limitations under the License.
    18  */
    19  
    20  // Go 1.13 is the minimally supported version for Windows.
    21  // Earlier golang releases have bug in os.Readlink
    22  // (see https://github.com/golang/go/issues/30463).
    23  
    24  package driver
    25  
    26  import (
    27  	"os"
    28  )
    29  
    30  func (d *driver) Mknod(path string, mode os.FileMode, major, minor int) error {
    31  	return &os.PathError{Op: "mknod", Path: path, Err: ErrNotSupported}
    32  }
    33  
    34  func (d *driver) Mkfifo(path string, mode os.FileMode) error {
    35  	return &os.PathError{Op: "mkfifo", Path: path, Err: ErrNotSupported}
    36  }
    37  
    38  // Lchmod changes the mode of an file not following symlinks.
    39  func (d *driver) Lchmod(path string, mode os.FileMode) (err error) {
    40  	// TODO: Use Window's equivalent
    41  	return os.Chmod(path, mode)
    42  }
    43  

View as plain text