Debian Codegraph @

embedfs/embed.go

raw symbols SCIP
1 // embedfs exposes an embed.FS as a read-only billy.Filesystem.
2 package embedfsscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/
3
4 import (
5 "bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/"
6 "embedscip-go gomod github.com/golang/go/src go1.25.0 embed/"
7 "fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/"
8 iofsscip-go gomod github.com/golang/go/src go1.25.0 `io/fs`/ "io/fsscip-go gomod github.com/golang/go/src go1.25.0 `io/fs`/"
9 "osscip-go gomod github.com/golang/go/src go1.25.0 os/"
10 "path/filepathscip-go gomod github.com/golang/go/src go1.25.0 `path/filepath`/"
11 "stringsscip-go gomod github.com/golang/go/src go1.25.0 strings/"
12 "syncscip-go gomod github.com/golang/go/src go1.25.0 sync/"
13
14 "github.com/go-git/go-billy/v6scip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/"
15 )
16
17 // Embed is a read-only billy.Filesystem backed by an [embed.FS]. Write
18 // operations return [billy.ErrReadOnly]; symlink, chroot, lstat and tempfile
19 // operations return [billy.ErrNotSupported].
20 type Embedscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed# struct {
21 underlyingscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#underlying. iofsscip-go gomod github.com/golang/go/src go1.25.0 `io/fs`/.FSscip-go gomod github.com/golang/go/src go1.25.0 `io/fs`/FS#
22 }
23
24 // New returns a read-only [billy.Filesystem] backed by efs. A nil efs is
25 // treated as an empty [embed.FS].
26 func Newscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/New().(efs *embedscip-go gomod github.com/golang/go/src go1.25.0 embed/.FSscip-go gomod github.com/golang/go/src go1.25.0 embed/FS#) billyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/.Filesystemscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/Filesystem# {
27 fs := &Embedscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#{
28 underlyingscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#underlying.: efs,
29 }
30
31 if efs == nil {
32 fs.underlyingscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#underlying. = &embedscip-go gomod github.com/golang/go/src go1.25.0 embed/.FSscip-go gomod github.com/golang/go/src go1.25.0 embed/FS#{}
33 }
34
35 return fs
36 }
37
38 // Root returns the empty string. [Embed] has no notion of a base directory:
39 // paths are passed straight through to the wrapped [embed.FS], which uses
40 // forward-slash paths rooted at the embedding package.
41 func (fs *Embedscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#) Rootscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#Root().() string {
42 return ""
43 }
44
45 func (fs *Embedscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#) Statscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#Stat().(filename string) (osscip-go gomod github.com/golang/go/src go1.25.0 os/.FileInfoscip-go gomod github.com/golang/go/src go1.25.0 os/FileInfo#, error) {
46 return iofsscip-go gomod github.com/golang/go/src go1.25.0 `io/fs`/.Statscip-go gomod github.com/golang/go/src go1.25.0 `io/fs`/Stat().(fs.underlyingscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#underlying., filename)
47 }
48
49 func (fs *Embedscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#) Openscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#Open().(filename string) (billyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/.Filescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/File#, error) {
50 return fs.OpenFilescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#OpenFile().(filename, osscip-go gomod github.com/golang/go/src go1.25.0 os/.O_RDONLYscip-go gomod github.com/golang/go/src go1.25.0 os/O_RDONLY., 0)
51 }
52
53 func (fs *Embedscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#) OpenFilescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#OpenFile().(filename string, flag int, _ osscip-go gomod github.com/golang/go/src go1.25.0 os/.FileModescip-go gomod github.com/golang/go/src go1.25.0 os/FileMode#) (billyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/.Filescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/File#, error) {
54 if flag&(osscip-go gomod github.com/golang/go/src go1.25.0 os/.O_CREATEscip-go gomod github.com/golang/go/src go1.25.0 os/O_CREATE.|osscip-go gomod github.com/golang/go/src go1.25.0 os/.O_WRONLYscip-go gomod github.com/golang/go/src go1.25.0 os/O_WRONLY.|osscip-go gomod github.com/golang/go/src go1.25.0 os/.O_APPENDscip-go gomod github.com/golang/go/src go1.25.0 os/O_APPEND.|osscip-go gomod github.com/golang/go/src go1.25.0 os/.O_RDWRscip-go gomod github.com/golang/go/src go1.25.0 os/O_RDWR.|osscip-go gomod github.com/golang/go/src go1.25.0 os/.O_EXCLscip-go gomod github.com/golang/go/src go1.25.0 os/O_EXCL.|osscip-go gomod github.com/golang/go/src go1.25.0 os/.O_TRUNCscip-go gomod github.com/golang/go/src go1.25.0 os/O_TRUNC.) != 0 {
55 return nil, billyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/.ErrReadOnlyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/ErrReadOnly.
56 }
57
58 fi, err := iofsscip-go gomod github.com/golang/go/src go1.25.0 `io/fs`/.Statscip-go gomod github.com/golang/go/src go1.25.0 `io/fs`/Stat().(fs.underlyingscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#underlying., filename)
59 if err != nil {
60 return nil, err
61 }
62
63 if fi.IsDirscip-go gomod github.com/golang/go/src go1.25.0 `io/fs`/FileInfo#IsDir().() {
64 return nil, fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/.Errorfscip-go gomod github.com/golang/go/src go1.25.0 fmt/Errorf().("cannot open directory: %s", filename)
65 }
66
67 data, err := iofsscip-go gomod github.com/golang/go/src go1.25.0 `io/fs`/.ReadFilescip-go gomod github.com/golang/go/src go1.25.0 `io/fs`/ReadFile().(fs.underlyingscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#underlying., filename)
68 if err != nil {
69 return nil, err
70 }
71
72 // Only load the bytes to memory if the files is needed.
73 lazyFunc := func() *bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/.Readerscip-go gomod github.com/golang/go/src go1.25.0 bytes/Reader# { return bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/.NewReaderscip-go gomod github.com/golang/go/src go1.25.0 bytes/NewReader().(data) }
74 return toFilescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/toFile().(lazyFunc, fi), nil
75 }
76
77 // Join return a path with all elements joined by forward slashes.
78 //
79 // This behaviour is OS-agnostic.
80 func (fs *Embedscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#) Joinscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#Join().(elem ...string) string {
81 for i, el := range elem {
82 if el != "" {
83 clean := filepathscip-go gomod github.com/golang/go/src go1.25.0 `path/filepath`/.Cleanscip-go gomod github.com/golang/go/src go1.25.0 `path/filepath`/Clean().(stringsscip-go gomod github.com/golang/go/src go1.25.0 strings/.Joinscip-go gomod github.com/golang/go/src go1.25.0 strings/Join().(elem[i:], "/"))
84 return filepathscip-go gomod github.com/golang/go/src go1.25.0 `path/filepath`/.ToSlashscip-go gomod github.com/golang/go/src go1.25.0 `path/filepath`/ToSlash().(clean)
85 }
86 }
87 return ""
88 }
89
90 func (fs *Embedscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#) ReadDirscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#ReadDir().(path string) ([]iofsscip-go gomod github.com/golang/go/src go1.25.0 `io/fs`/.DirEntryscip-go gomod github.com/golang/go/src go1.25.0 `io/fs`/DirEntry#, error) {
91 return iofsscip-go gomod github.com/golang/go/src go1.25.0 `io/fs`/.ReadDirscip-go gomod github.com/golang/go/src go1.25.0 `io/fs`/ReadDir().(fs.underlyingscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#underlying., path)
92 }
93
94 func (fs *Embedscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#) Capabilitiesscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#Capabilities().() billyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/.Capabilityscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/Capability# {
95 return billyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/.ReadCapabilityscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/ReadCapability. | billyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/.SeekCapabilityscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/SeekCapability.
96 }
97
98 // Chroot is not supported.
99 //
100 // Calls will always return billy.ErrNotSupported.
101 func (fs *Embedscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#) Chrootscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#Chroot().(_ string) (billyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/.Filesystemscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/Filesystem#, error) {
102 return nil, billyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/.ErrNotSupportedscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/ErrNotSupported.
103 }
104
105 // Lstat is not supported.
106 //
107 // Calls will always return billy.ErrNotSupported.
108 func (fs *Embedscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#) Lstatscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#Lstat().(_ string) (osscip-go gomod github.com/golang/go/src go1.25.0 os/.FileInfoscip-go gomod github.com/golang/go/src go1.25.0 os/FileInfo#, error) {
109 return nil, billyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/.ErrNotSupportedscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/ErrNotSupported.
110 }
111
112 // Readlink is not supported.
113 //
114 // Calls will always return billy.ErrNotSupported.
115 func (fs *Embedscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#) Readlinkscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#Readlink().(_ string) (string, error) {
116 return "", billyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/.ErrNotSupportedscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/ErrNotSupported.
117 }
118
119 // TempFile is not supported.
120 //
121 // Calls will always return billy.ErrNotSupported.
122 func (fs *Embedscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#) TempFilescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#TempFile().(_, _ string) (billyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/.Filescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/File#, error) {
123 return nil, billyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/.ErrNotSupportedscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/ErrNotSupported.
124 }
125
126 // Symlink is not supported.
127 //
128 // Calls will always return billy.ErrReadOnly.
129 func (fs *Embedscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#) Symlinkscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#Symlink().(_, _ string) error {
130 return billyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/.ErrReadOnlyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/ErrReadOnly.
131 }
132
133 // Create is not supported.
134 //
135 // Calls will always return billy.ErrReadOnly.
136 func (fs *Embedscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#) Createscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#Create().(_ string) (billyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/.Filescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/File#, error) {
137 return nil, billyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/.ErrReadOnlyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/ErrReadOnly.
138 }
139
140 // Rename is not supported.
141 //
142 // Calls will always return billy.ErrReadOnly.
143 func (fs *Embedscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#) Renamescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#Rename().(_, _ string) error {
144 return billyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/.ErrReadOnlyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/ErrReadOnly.
145 }
146
147 // Remove is not supported.
148 //
149 // Calls will always return billy.ErrReadOnly.
150 func (fs *Embedscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#) Removescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#Remove().(_ string) error {
151 return billyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/.ErrReadOnlyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/ErrReadOnly.
152 }
153
154 // MkdirAll is not supported.
155 //
156 // Calls will always return billy.ErrReadOnly.
157 func (fs *Embedscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#) MkdirAllscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/Embed#MkdirAll().(_ string, _ osscip-go gomod github.com/golang/go/src go1.25.0 os/.FileModescip-go gomod github.com/golang/go/src go1.25.0 os/FileMode#) error {
158 return billyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/.ErrReadOnlyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/ErrReadOnly.
159 }
160
161 func toFilescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/toFile().(lazy func() *bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/.Readerscip-go gomod github.com/golang/go/src go1.25.0 bytes/Reader#, fi iofsscip-go gomod github.com/golang/go/src go1.25.0 `io/fs`/.FileInfoscip-go gomod github.com/golang/go/src go1.25.0 `io/fs`/FileInfo#) billyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/.Filescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/File# {
162 return &filescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#{
163 lazyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#lazy.: lazy,
164 fiscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#fi.: fi,
165 }
166 }
167
168 type filescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file# struct {
169 lazyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#lazy. func() *bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/.Readerscip-go gomod github.com/golang/go/src go1.25.0 bytes/Reader#
170 readerscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#reader. *bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/.Readerscip-go gomod github.com/golang/go/src go1.25.0 bytes/Reader#
171 fiscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#fi. iofsscip-go gomod github.com/golang/go/src go1.25.0 `io/fs`/.FileInfoscip-go gomod github.com/golang/go/src go1.25.0 `io/fs`/FileInfo#
172 oncescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#once. syncscip-go gomod github.com/golang/go/src go1.25.0 sync/.Oncescip-go gomod github.com/golang/go/src go1.25.0 sync/Once#
173 }
174
175 func (f *filescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#) loadReaderscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#loadReader().() {
176 f.readerscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#reader. = f.lazyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#lazy.()
177 }
178
179 func (f *filescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#) Namescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#Name().() string {
180 return f.fiscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#fi..Namescip-go gomod github.com/golang/go/src go1.25.0 `io/fs`/FileInfo#Name().()
181 }
182
183 func (f *filescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#) Readscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#Read().(b []byte) (int, error) {
184 f.oncescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#once..Doscip-go gomod github.com/golang/go/src go1.25.0 sync/Once#Do().(f.loadReaderscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#loadReader().)
185
186 return f.readerscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#reader..Readscip-go gomod github.com/golang/go/src go1.25.0 bytes/Reader#Read().(b)
187 }
188
189 func (f *filescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#) ReadAtscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#ReadAt().(b []byte, off int64) (int, error) {
190 f.oncescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#once..Doscip-go gomod github.com/golang/go/src go1.25.0 sync/Once#Do().(f.loadReaderscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#loadReader().)
191
192 return f.readerscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#reader..ReadAtscip-go gomod github.com/golang/go/src go1.25.0 bytes/Reader#ReadAt().(b, off)
193 }
194
195 func (f *filescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#) Seekscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#Seek().(offset int64, whence int) (int64, error) {
196 f.oncescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#once..Doscip-go gomod github.com/golang/go/src go1.25.0 sync/Once#Do().(f.loadReaderscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#loadReader().)
197
198 return f.readerscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#reader..Seekscip-go gomod github.com/golang/go/src go1.25.0 bytes/Reader#Seek().(offset, whence)
199 }
200
201 func (f *filescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#) Statscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#Stat().() (osscip-go gomod github.com/golang/go/src go1.25.0 os/.FileInfoscip-go gomod github.com/golang/go/src go1.25.0 os/FileInfo#, error) {
202 return f.fiscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#fi., nil
203 }
204
205 // Close for embedfs file is a no-op.
206 func (f *filescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#) Closescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#Close().() error {
207 return nil
208 }
209
210 // Truncate is not supported.
211 //
212 // Calls will always return billy.ErrReadOnly.
213 func (f *filescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#) Truncatescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#Truncate().(_ int64) error {
214 return billyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/.ErrReadOnlyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/ErrReadOnly.
215 }
216
217 // Write is not supported.
218 //
219 // Calls will always return billy.ErrReadOnly.
220 func (f *filescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#) Writescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#Write().(_ []byte) (int, error) {
221 return 0, billyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/.ErrReadOnlyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/ErrReadOnly.
222 }
223
224 // WriteAt is not supported.
225 //
226 // Calls will always return billy.ErrReadOnly.
227 func (f *filescip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#) WriteAtscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6/embedfs`/file#WriteAt().([]byte, int64) (int, error) {
228 return 0, billyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/.ErrReadOnlyscip-go gomod github.com/go-git/go-billy/v6 . `github.com/go-git/go-billy/v6`/ErrReadOnly.
229 }