vue updates ^_^

Former-commit-id: 336b37cf681ec2337a1e4d577213aa45f12b81d6 [formerly d8cbb6ff242f9ab3e5c857da6f6758abb0f4fc1a] [formerly 8b9089c816fae3608bf5ef8592cb776fa420a6f6 [formerly e2077efbc6a49a82c9f0fc8741304fd2fc9c7e93]]
Former-commit-id: 30b063fdab7de6f2c1c5f46dd8a1dd354897f5b6 [formerly 8f83b525334b9430ddbe779c6eae3251a5590b75]
Former-commit-id: bbe19a047d103531a542bebb1fe0263bec4cbd88
This commit is contained in:
Henrique Dias
2017-06-28 16:05:30 +01:00
parent bf4739697f
commit 834ce7ac4a
21 changed files with 532 additions and 452 deletions

40
file.go
View File

@@ -31,48 +31,48 @@ type fileInfo struct {
// Used to store the file's content temporarily.
content []byte
// The name of the file.
Name string
Name string `json:"name"`
// The Size of the file.
Size int64
Size int64 `json:"size"`
// The absolute URL.
URL string
URL string `json:"url"`
// The extension of the file.
Extension string
Extension string `json:"extension"`
// The last modified time.
ModTime time.Time
ModTime time.Time `json:"modified"`
// The File Mode.
Mode os.FileMode
Mode os.FileMode `json:"mode"`
// Indicates if this file is a directory.
IsDir bool
IsDir bool `json:"isDir"`
// Absolute path.
Path string
Path string `json:"path"`
// Relative path to user's virtual File System.
VirtualPath string
VirtualPath string `json:"virtualPath"`
// Indicates the file content type: video, text, image, music or blob.
Type string
Type string `json:"type"`
// Stores the content of a text file.
Content string
Content string `json:"content"`
}
// A listing is the context used to fill out a template.
type listing struct {
// The name of the directory (the last element of the path).
Name string
Name string `json:"-"`
// The full path of the request relatively to a File System.
Path string
Path string `json:"-"`
// The items (files and folders) in the path.
Items []fileInfo
Items []fileInfo `json:"items"`
// The number of directories in the listing.
NumDirs int
NumDirs int `json:"numDirs"`
// The number of files (items that aren't directories) in the listing.
NumFiles int
NumFiles int `json:"numFiles"`
// Which sorting order is used.
Sort string
Sort string `json:"sort"`
// And which order.
Order string
Order string `json:"order"`
// If ≠0 then Items have been limited to that many elements.
ItemsLimitedTo int
Display string
ItemsLimitedTo int `json:"ItemsLimitedTo"`
Display string `json:"display"`
}
// getInfo gets the file information and, in case of error, returns the