...

Source file src/github.com/containerd/continuity/fs/fstest/file_windows.go

Documentation: github.com/containerd/continuity/fs/fstest

     1  /*
     2     Copyright The containerd Authors.
     3  
     4     Licensed under the Apache License, Version 2.0 (the "License");
     5     you may not use this file except in compliance with the License.
     6     You may obtain a copy of the License at
     7  
     8         http://www.apache.org/licenses/LICENSE-2.0
     9  
    10     Unless required by applicable law or agreed to in writing, software
    11     distributed under the License is distributed on an "AS IS" BASIS,
    12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13     See the License for the specific language governing permissions and
    14     limitations under the License.
    15  */
    16  
    17  package fstest
    18  
    19  import (
    20  	"errors"
    21  	"time"
    22  )
    23  
    24  // Lchtimes changes access and mod time of file without following symlink
    25  func Lchtimes(name string, atime, mtime time.Time) Applier {
    26  	return applyFn(func(root string) error {
    27  		return errors.New("Not implemented")
    28  	})
    29  }
    30  
    31  // Base applies the files required to make a valid Windows container layer
    32  // that the filter will mount. It is used for testing the snapshotter
    33  func Base() Applier {
    34  	return Apply(
    35  		CreateDir("Windows", 0o755),
    36  		CreateDir("Windows/System32", 0o755),
    37  		CreateDir("Windows/System32/Config", 0o755),
    38  		CreateFile("Windows/System32/Config/SYSTEM", []byte("foo\n"), 0o777),
    39  		CreateFile("Windows/System32/Config/SOFTWARE", []byte("foo\n"), 0o777),
    40  		CreateFile("Windows/System32/Config/SAM", []byte("foo\n"), 0o777),
    41  		CreateFile("Windows/System32/Config/SECURITY", []byte("foo\n"), 0o777),
    42  		CreateFile("Windows/System32/Config/DEFAULT", []byte("foo\n"), 0o777),
    43  	)
    44  }
    45  

View as plain text