This crate aims to provide a flexible and high-level interface to the
libmtp library, at
its current state is alpha software and may not be used in production since some features
are still missing, said this contributions are welcome.
The usual way to start using this library is with the
detect_raw_devices function which returns a list of
RawDevices, i.e. the connected USB devices, using these
devices you can open an
MtpDevice, with this you can gather
device properties like manufacturer, model, battery level, etc; and manage objects like files,
tracks, albums, etc with
Here we list the more important modules:
device: Gather/set properties and obtain storage.
storage: Send/get objects (files, tracks, etc) and manage storage.
object: Copying, moving and deleting objects.
Aditionally if you want a more low-level control on the attributes of certain objects you may
want to check the methods to get and set properties in the
trait to see how to use it with instances of its implementors.
This module groups all the operations you can do on an MTP device, like gathering information, properties, support for filetypes, and update/gather storage in order to be able to send or get files, folders, tracks, etc.
This module contains information about possible errors, such as internal and
Module to manage some internal functionality of
Everything on the Media Transfer Protocol is an object, this module groups common behavior and items of many higher abstractions like files, tracks, albums, etc.
Utilities that doesn't fit anywhere else, mostly contains internal crate functions (which are not public) and other useful public items.
This module contains items used to determine which values are allowed to be used on certain object attributes (aka properties).
Custom Result type, this is the most used Result in this crate.