pub fn is_candidate_path(path: impl AsRef<Path>) -> crate::Result<FormatVersion> {
    let mut file = File::open(path)?;
    let v2 = Tag::is_candidate(&mut file)?;
    let v1 = v1::Tag::is_candidate(&mut file)?;
    Ok(match (v1, v2) {
        (false, false) => FormatVersion::None,
        (true, false) => FormatVersion::Id3v1,
        (false, true) => FormatVersion::Id3v2,
        (true, true) => FormatVersion::Both,
    })
}
/// Returns which tags are present in the specified file.
Returns which tags are present in the specified file.
Returns which tags are present in the specified file .
pub fn is_candidate_path(path: impl AsRef<Path>) -> crate::Result<FormatVersion> {
    let mut file = File::open(path)?;
    let v2 = Tag::is_candidate(&mut file)?;
    let v1 = v1::Tag::is_candidate(&mut file)?;
    Ok(match (v1, v2) {
        (false, false) => FormatVersion::None,
        (true, false) => FormatVersion::Id3v1,
        (false, true) => FormatVersion::Id3v2,
        (true, true) => FormatVersion::Both,
    })
}
pub fn is_candidate_path ( path : impl AsRef < Path > ) -> crate :: Result < FormatVersion > { let mut file = File :: open ( path ) ? ; let v2 = Tag :: is_candidate ( & mut file ) ? ; let v1 = v1 :: Tag :: is_candidate ( & mut file ) ? ; Ok ( match ( v1 , v2 ) { ( false , false ) => FormatVersion :: None , ( true , false ) => FormatVersion :: Id3v1 , ( false , true ) => FormatVersion :: Id3v2 , ( true , true ) => FormatVersion :: Both , } ) }
Returns which tags are present in the specified file.
Returns which tags are present in the specified file .
path
impl AsRef<Path>
path
impl AsRef<Path>