-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document how to read squashfs files #32
Comments
Reading any filesystem is identical. One of the key points of the lib is to abstract it all. So it almost is it, but not quite. package main
import (
"log"
"os"
diskfs "github.com/diskfs/go-diskfs"
)
func main() {
disk, err := diskfs.Open("/home/me/go/src/github.com/diskfs/go-diskfs/filesystem/squashfs/testdata/file.sqs")
if err != nil {
log.Panic(err)
}
fs, err := disk.GetFilesystem(0) // assuming it is the whole disk, so partition = 0
if err != nil {
log.Panic(err)
}
files, err := fs.ReadDir("/") // this should list everything
} We probably should document this, so keep it open. |
Merged
Thanks for the example @deitch however it does not compile for me:
|
Yeah it’s just sample code. Not really runnable. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, thanks for this very useful library. Could you please document how to read squashfs files and print the files, directories, and symlinks contained therein; e.g., is the following halfway right?
The text was updated successfully, but these errors were encountered: