// From the code to initialize AXIS in Rubble
fs := new(axis2.FileSystem)
fs.Mount("df", sources.NewOSDir(dfdir), true)fs.Mount("rubble", sources.NewOSDir(rubbledir), true)fs.Mount("out", sources.NewOSDir(output), true) for i := range addonsdir { fs.Mount("addons", sources.NewOSDir(addonsdir[i]), true)}
// From part of the Rubble addon loader (mount and read from a zip file)
content, err := fs.ReadAll("addons/"+name+".zip")if err != nil { errors.RaiseWrappedError("While reading zip file:", err)}
ds, err = zip.NewRawDir(content)if err != nil { errors.RaiseWrappedError("While reading zip file:", err)}
fs.Mount("loader/pack", ds, false)meta = loadPackMeta(fs, "loader/pack")fs.Unmount("loader/pack", true)
// More code from the loader
for _, filepath := range fs.ListFiles(dirpath) { content, err := fs.ReadAll(path+filepath) if err != nil { panic(err) }
...}