{"modulePath":"github.com/MG-RAST/Shock","version":"v0.9.29","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package file\n\nPackage contains Node File struct and MultiReaderAt implementation\n\n## Functions\n\n```go\nfunc RemoveAllFormFiles(formfiles FormFiles)\n```\n\n## Types\n\n```go\ntype File struct {\n\tName         string            `bson:\"name\" json:\"name\"`\n\tSize         int64             `bson:\"size\" json:\"size\"`\n\tChecksum     map[string]string `bson:\"checksum\" json:\"checksum\"`\n\tFormat       string            `bson:\"format\" json:\"format\"`\n\tPath         string            `bson:\"path\" json:\"-\"`\n\tVirtual      bool              `bson:\"virtual\" json:\"virtual\"`\n\tVirtualParts []string          `bson:\"virtual_parts\" json:\"virtual_parts\"`\n\tCreatedOn    time.Time         `bson:\"created_on\" json:\"created_on\"`\n\tLocked       *locker.LockInfo  `bson:\"-\" json:\"locked\"`\n}\n```\nFile is the Node file structure. Contains the json/bson marshalling controls.\n\n```go\ntype FileInfo struct {\n\tR        []SectionReader\n\tE        error\n\tESection int\n\tBody     io.ReadCloser\n\tName     string\n\tSize     int64\n\tModTime  time.Time\n\tChecksum string\n}\n```\nFileInfo for streaming file content\n\n```go\ntype FormFile struct {\n\tName     string\n\tPath     string\n\tChecksum map[string]string\n}\n```\n\n```go\nfunc (formfile *FormFile) Remove()\n```\n\n```go\ntype FormFiles map[string]FormFile\n```\n\n```go\ntype ReaderAt interface {\n\tSectionReader\n\tStat() (os.FileInfo, error)\n\tClose() error\n}\n```\nReaderAt interface that is compatiable with os.File types.\n\n```go\nfunc MultiReaderAt(readers ...ReaderAt) ReaderAt\n```\nMultiReaderAt returns a ReaderAt that's the logical concatenation of the provided input readers. BUG / KNOW-ISSUE: all file handles are opened initially. May not be suitiable for large numbers of files.\n\n```go\ntype SectionReader interface {\n\tio.Reader\n\tio.ReaderAt\n}\n```\nSectionReader interface required for MultiReaderAt\n\n","path":"github.com/MG-RAST/Shock/shock-server/node/file","name":"file","synopsis":"Package contains Node File struct and MultiReaderAt implementation","isRedistributable":true}
