#[non_exhaustive]pub struct FileDropEvent {
pub uris: Vec<String>,
pub mime_types: Vec<String>,
pub page_position: Option<Point<Points>>,
pub files: Vec<PickedFile>,
}Expand description
Local files or directories dropped on an element (on_file_drop).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.uris: Vec<String>Absolute file: URLs in platform order; encoded filenames are preserved.
mime_types: Vec<String>The MIME type of each of uris, in their order, by the file’s name
(TS: mimeTypes): "" when the name says none (a directory, no
extension), as the DOM’s File.type.
page_position: Option<Point<Points>>Where the files were let go, in the window’s coordinates, as a
mouse event’s page_position (TS: pagePosition): on AppKit, GTK,
Win32, iOS, Android and the Web; None on the GPUI backend.
files: Vec<PickedFile>The dropped regular files with their contents, on backends that hand
over contents instead of paths (the Web, and on macOS files a drag
only promises, such as an image out of a browser’s page; uris is
empty then):
in the drop’s order, directories left out, so not by index of
uris. Each keeps its bytes after the listener returns.