sys::Obj flux::Resource flux::FileResource
FileResource models a
File as a Flux resource.
virtual override FileResource? children()
Get the navigation children of the resource. Return an empty list or null to indicate no children. Default returns null.
const File file
The target file.
Get the icon for the specified file based on its mime type.
virtual override Bool hasChildren()
If we haven't loaded the children yet, then return true for directories and false for normal files.
virtual override Image icon
The icon is based on mime type.
Make a resource for the specified file.
virtual override Str name
Return the file name.
Add command specific Files.
Given a file size in bytes return a suitable string representation for display. If size is null return "".
Sort files in-place for display. Directories are always sorted before normal files using locale name comparison.
virtual override Uri uri
The absolute file uri
virtual override Type views()
View types are based on mime type. Register a file view using the facet "fluxViewMimeType" with a Str value for the MIME type such as "image/png". You can also register with just the media type, for example use "image" to register a view on any image file.