Documentation
¶
Overview ¶
Copyright 2025 AlaudaDevops authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2025 AlaudaDevops authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package fake provides fake mocking of fscopy interfaces
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeFileFilter ¶
type FakeFileFilter struct {
Allowed bool
Err error
FunWalkDir func(ctx context.Context, path string, d fs.DirEntry, err error) error
}
func (*FakeFileFilter) IsFileAllowed ¶
func (*FakeFileFilter) WalkDirFunc ¶
type FakeFileInfo ¶
type FakeFileInfo struct {
// Path is the file path, returned when GetPath is called
Path string
// FileName is the base name of the file
FileName string
// Size is the length in bytes for regular files
FileSize int64
// Mode represents the file mode and permission bits
FileMode fs.FileMode
// ModTime is the file's last modification time
FileModTime time.Time
// IsDir indicates whether the file is a directory
FileIsDir bool
// Sys holds OS-specific file information
FileSys any
}
FakeFileInfo is a struct that implements fs.FileInfo for testing purposes
func (*FakeFileInfo) GetPath ¶
func (f *FakeFileInfo) GetPath() string
GetPath returns the file path
func (*FakeFileInfo) IsDir ¶
func (f *FakeFileInfo) IsDir() bool
func (*FakeFileInfo) ModTime ¶
func (f *FakeFileInfo) ModTime() time.Time
func (*FakeFileInfo) Mode ¶
func (f *FakeFileInfo) Mode() fs.FileMode
func (*FakeFileInfo) Name ¶
func (f *FakeFileInfo) Name() string
func (*FakeFileInfo) Size ¶
func (f *FakeFileInfo) Size() int64
func (*FakeFileInfo) Sys ¶
func (f *FakeFileInfo) Sys() any