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
Levin Zimmermann
go-fuse
Commits
2b9f0042
Commit
2b9f0042
authored
Mar 23, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename zipfs ctor to NewZipArchiveFileSystem.
parent
5db91988
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
examplelib/multizip.go
examplelib/multizip.go
+1
-1
examplelib/zipfs.go
examplelib/zipfs.go
+2
-1
No files found.
examplelib/multizip.go
View file @
2b9f0042
...
@@ -43,7 +43,7 @@ func (me *zipCreateFile) Write(input *fuse.WriteIn, nameBytes []byte) (uint32, f
...
@@ -43,7 +43,7 @@ func (me *zipCreateFile) Write(input *fuse.WriteIn, nameBytes []byte) (uint32, f
zipFile
:=
string
(
nameBytes
)
zipFile
:=
string
(
nameBytes
)
zipFile
=
strings
.
Trim
(
zipFile
,
"
\n
"
)
zipFile
=
strings
.
Trim
(
zipFile
,
"
\n
"
)
fs
:=
NewZip
FileFuse
(
zipFile
)
fs
:=
NewZip
ArchiveFileSystem
(
zipFile
)
if
fs
==
nil
{
if
fs
==
nil
{
// TODO
// TODO
log
.
Println
(
"NewZipFileFuse returned nil"
)
log
.
Println
(
"NewZipFileFuse returned nil"
)
...
...
examplelib/zipfs.go
View file @
2b9f0042
...
@@ -101,7 +101,7 @@ func zipFilesToTree(files []*zip.File) *ZipDirTree {
...
@@ -101,7 +101,7 @@ func zipFilesToTree(files []*zip.File) *ZipDirTree {
}
}
func
NewZip
FileFuse
(
name
string
)
*
ZipFileFuse
{
func
NewZip
ArchiveFileSystem
(
name
string
)
*
ZipFileFuse
{
z
:=
new
(
ZipFileFuse
)
z
:=
new
(
ZipFileFuse
)
r
,
err
:=
zip
.
OpenReader
(
name
)
r
,
err
:=
zip
.
OpenReader
(
name
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -129,6 +129,7 @@ func (me *ZipFileFuse) GetAttr(name string) (*fuse.Attr, fuse.Status) {
...
@@ -129,6 +129,7 @@ func (me *ZipFileFuse) GetAttr(name string) (*fuse.Attr, fuse.Status) {
if
file
==
nil
{
if
file
==
nil
{
a
.
Mode
=
zip_DIRMODE
a
.
Mode
=
zip_DIRMODE
}
else
{
}
else
{
// TODO - do something intelligent with timestamps.
a
.
Mode
=
zip_FILEMODE
a
.
Mode
=
zip_FILEMODE
a
.
Size
=
uint64
(
file
.
UncompressedSize
)
a
.
Size
=
uint64
(
file
.
UncompressedSize
)
}
}
...
...
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