Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cookie.load_buffers #20

Closed
wants to merge 2 commits into from
Closed

Add Cookie.load_buffers #20

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Oct 28, 2019

Adds a binding for magic_load_buffers. Requires rust-magic-sys#10.

Intended to be used like this:

let cookie = magic::Cookie::open(magic::CookieFlags::default());
let magic_data = std::fs::read("/usr/share/misc/magic.mgc").unwrap();
let buffers = vec![magic_data.as_slice()];
cookie.load_buffers(&*buffers).unwrap();
println!("{:?}", cookie.file("/usr/share/misc/magic.mgc"));

@robo9k robo9k mentioned this pull request Nov 6, 2021
@robo9k robo9k closed this in #32 Nov 6, 2021
@ghost ghost deleted the load-buffers branch November 7, 2021 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant