Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go-fuse
Commits
9636c970
Commit
9636c970
authored
Mar 22, 2019
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nodefs: add more comments in zipfs
parent
d1c9d5a4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
nodefs/zip_test.go
nodefs/zip_test.go
+5
-5
No files found.
nodefs/zip_test.go
View file @
9636c970
...
...
@@ -109,7 +109,7 @@ func TestZipFS(t *testing.T) {
}
}
// zipFile is a file read from a zip
fil
e.
// zipFile is a file read from a zip
archiv
e.
type
zipFile
struct
{
DefaultOperations
file
*
zip
.
File
...
...
@@ -145,12 +145,12 @@ func (zf *zipFile) Open(ctx context.Context, flags uint32) (FileHandle, uint32,
}
// We don't return a filehandle since we don't really need
// one.
return
nil
,
0
,
fuse
.
OK
// one. The file content is immutable, so hint the kernel to
// cache the data.
return
nil
,
fuse
.
FOPEN_KEEP_CACHE
,
fuse
.
OK
}
// Read sets the minimum, which is the size. A more full-featured
// FS would also set timestamps and permissions.
// Read simply returns the data that was already unpacked in the Open call
func
(
zf
*
zipFile
)
Read
(
ctx
context
.
Context
,
f
FileHandle
,
dest
[]
byte
,
off
int64
)
(
fuse
.
ReadResult
,
fuse
.
Status
)
{
end
:=
int
(
off
)
+
len
(
dest
)
if
end
>
len
(
zf
.
data
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment