Thanks to visit codestin.com
Credit goes to github.com

Skip to content

frofor/libmtp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libmtp

A memory safe API for interacting with libmtp library in Rust.

crates.io

Installation

To install the latest version of the crate from crates.io, run:

$ cargo add libmtp

Getting started

To get started, create a new program that prints all objects in the root folder of your storage:

use libmtp::RawDevice;
use libmtp::search_raw_devices;

fn main() -> libmtp::Result<()> {
	for device in search_raw_devices()?.filter_map(RawDevice::open_uncached) {
		for storage in &device {
			for object in &storage {
				println!("{object:?}");
			}
		}
	}
	Ok(())
}

For more examples, see examples.

Changelog

For a release history, see CHANGELOG.md.

Contributing

For a contibuting guide, see CONTRIBUTING.md.

License

This crate is distributed under the terms of MIT License.

See LICENSE for details.

About

A memory safe API for interacting with libmtp library in Rust

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages