Function ape::read [] [src]

pub fn read<P: AsRef<Path>>(path: P) -> Result<Tag>

Attempts to read APE tag from the file at the specified path.

Errors

It is considered a error when:

  • APE tag does not exists.
  • Tag version is not 2.000.
  • Item key is not valid.
  • Kind of an item is unknown.
  • Tag size declared in the APE header does not match with actual size.

Examples

use ape::read;

let tag = read("path/to/file").unwrap();
let item = tag.item("artist").unwrap();
println!("{:?}", item.value);