{"modulePath":"github.com/hack-pad/hackpadfs","version":"v0.2.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cache\n\nPackage cache contains a read-only cache file system.\n\n## Types\n\n```go\ntype ReadOnlyFS struct {\n\t// contains filtered or unexported fields\n}\n```\nReadOnlyFS is a read-only cache for an FS. Source FS data must not change. Data is assumed unchanged to increase performance.\n\n```go\nfunc NewReadOnlyFS(source hackpadfs.FS, cache writableFS, options ReadOnlyOptions) (*ReadOnlyFS, error)\n```\nNewReadOnlyFS creates a new ReadOnlyFS with the given 'source' of data, a writable 'cache' FS, and any additional options.\n\n```go\nfunc (fs *ReadOnlyFS) Open(name string) (hackpadfs.File, error)\n```\nOpen implements hackpadfs.FS\n\n```go\nfunc (fs *ReadOnlyFS) Stat(name string) (hackpadfs.FileInfo, error)\n```\nStat implements hackpadfs.StatFS\n\n```go\ntype ReadOnlyOptions struct {\n\tRetainData func(name string, info hackpadfs.FileInfo) bool\n}\n```\nReadOnlyOptions contain options for creating a ReadOnlyFS\n\n","path":"github.com/hack-pad/hackpadfs/cache","name":"cache","synopsis":"Package cache contains a read-only cache file system.","isRedistributable":true}
