Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ContentBinaryHeaderValue header value for binary data. ContentBinaryHeaderValue = "application/octet-stream" // ContentWebassemblyHeaderValue header value for web assembly files. ContentWebassemblyHeaderValue = "application/wasm" // ContentHTMLHeaderValue is the string of text/html response header's content type value. ContentHTMLHeaderValue = "text/html" // ContentJSONHeaderValue header value for JSON data. ContentJSONHeaderValue = "application/json" // ContentJSONProblemHeaderValue header value for JSON API problem error. // Read more at: https://tools.ietf.org/html/rfc7807 ContentJSONProblemHeaderValue = "application/problem+json" // ContentXMLProblemHeaderValue header value for XML API problem error. // Read more at: https://tools.ietf.org/html/rfc7807 ContentXMLProblemHeaderValue = "application/problem+xml" // ContentJavascriptHeaderValue header value for JSONP & Javascript data. ContentJavascriptHeaderValue = "text/javascript" // ContentTextHeaderValue header value for Text data. ContentTextHeaderValue = "text/plain" // ContentXMLHeaderValue header value for XML data. ContentXMLHeaderValue = "text/xml" // ContentXMLUnreadableHeaderValue obselete header value for XML. ContentXMLUnreadableHeaderValue = "application/xml" // ContentMarkdownHeaderValue custom key/content type, the real is the text/html. ContentMarkdownHeaderValue = "text/markdown" // ContentYAMLHeaderValue header value for YAML data. ContentYAMLHeaderValue = "application/x-yaml" // ContentYAMLTextHeaderValue header value for YAML plain text. ContentYAMLTextHeaderValue = "text/yaml" // ContentProtobufHeaderValue header value for Protobuf messages data. ContentProtobufHeaderValue = "application/x-protobuf" // ContentMsgPackHeaderValue header value for MsgPack data. ContentMsgPackHeaderValue = "application/msgpack" // ContentMsgPack2HeaderValue alternative header value for MsgPack data. ContentMsgPack2HeaderValue = "application/x-msgpack" // ContentFormHeaderValue header value for post form data. ContentFormHeaderValue = "application/x-www-form-urlencoded" // ContentFormMultipartHeaderValue header value for post multipart form data. ContentFormMultipartHeaderValue = "multipart/form-data" // ContentMultipartRelatedHeaderValue header value for multipart related data. ContentMultipartRelatedHeaderValue = "multipart/related" // ContentGRPCHeaderValue Content-Type header value for gRPC. ContentGRPCHeaderValue = "application/grpc" )
View Source
const PermDir = 0755
View Source
const PermFile = 0644
Variables ¶
This section is empty.
Functions ¶
func IsNamedPipe ¶
Types ¶
type FileInfo ¶
type FileInfo struct { *Listing Fs afero.Fs `json:"-"` Path string `json:"path"` Name string `json:"name"` Size int64 `json:"size"` ModTime time.Time `json:"modified"` Mode os.FileMode `json:"mode"` IsDir bool `json:"isDir"` IsSymlink bool `json:"isSymlink"` Extension string `json:"extension"` Type string `json:"type"` Checksums map[string]string `json:"checksums,omitempty"` Token string `json:"token,omitempty"` PresignedURL string `json:"presignedURL,omitempty"` }
FileInfo describes a file.
func NewFileInfo ¶
func NewFileInfo(opts *FileOptions) (*FileInfo, error)
NewFileInfo creates a File object from a path and a given user. This File object will be automatically filled depending on if it is a directory or a file.
type FileOptions ¶
type FileOptions struct { Fs afero.Fs Path string Modify bool Expand bool Token string Checker rules.Checker }
FileOptions are the options when getting a file info.
Click to show internal directories.
Click to hide internal directories.