Example #1
0
// zx.GetAll using the app ns and dot.
func GetAll(path string) ([]byte, error) {
	if len(path) > 0 && path[0] == '#' {
		return nchan.Bytes(Get(path, 0, -1, ""))
	}
	path = app.AbsPath(path)
	_, trs, spaths, err := app.ResolveTree(path)
	if err != nil {
		return nil, err
	}
	return zx.GetAll(trs[0], spaths[0])
}
Example #2
0
// Helper to retrieve all the data from a Getter (eg, a Dir or File).
func GetAll(fs Getter, path string) ([]byte, error) {
	fc := fs.Get(path, 0, All, "")
	return nchan.Bytes(fc)
}