Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(path string)
Delete the file at the given path.
To avoid panics, you should check if the file exists.
func FileExists ¶
FileExists returns true if the file at the given path exists and is readable. Returns false if the given file is a directory.
func GetFileExtension ¶
GetFileExtension returns the last part of a file name. If the file doesn't have an extension, returns an empty string.
func GetMIMEType ¶
GetMIMEType get the mime type and size of the given file.
If the file cannot be opened, panics. You should check if the file exists, using "filesystem.FileExists()"", before calling this function.
func IsDirectory ¶
IsDirectory returns true if the file at the given path exists, is a directory and is readable.
Types ¶
type File ¶
type File struct { Header *multipart.FileHeader MIMEType string Data multipart.File }
File represents a file received from client.
func ParseMultipartFiles ¶
ParseMultipartFiles parse a single file field in a request.