package domain //设定文件结构 type FileInfo struct { FileName string `json:"fileName"` //文件名 FileType string `json:"fileType"` //文件夹或者文件 FilePath string `json:"filePath"` //相对路径 FileSize int64 `json:"fileSize"` //文件大小 FileTime FileTime `json:"fileTime"` //文件时间 Content []byte `json:"content"` //文件内容 Other interface{} `json:"other"` //其他信息 } type FileTime struct { CreateTime string `json:"createTime"` ModifyTime string `json:"modifyTime"` AccessTime string `json:"accessTime"` } type FileType int const ( FileTypeFolder FileType = iota //文件夹 FileTypeFile //文件 )