mirror of
https://github.com/rclone/rclone.git
synced 2025-06-04 19:24:35 +08:00
lsf: Add 'm' format specifier to show the MimeType
This commit is contained in:
@ -1430,6 +1430,13 @@ func (l *ListFormat) AddID() {
|
||||
})
|
||||
}
|
||||
|
||||
// AddMimeType adds file's MimeType to the output if known
|
||||
func (l *ListFormat) AddMimeType() {
|
||||
l.AppendOutput(func() string {
|
||||
return fs.MimeTypeDirEntry(l.entry)
|
||||
})
|
||||
}
|
||||
|
||||
// AppendOutput adds string generated by specific function to printed output
|
||||
func (l *ListFormat) AppendOutput(functionToAppend func() string) {
|
||||
if len(l.output) > 0 {
|
||||
|
Reference in New Issue
Block a user