Module Taglib.File

module File: sig .. end

type file_type = [ `Asf
| `Autodetect
| `Flac
| `Mp4
| `Mpc
| `Mpeg
| `OggFlac
| `OggVorbis
| `Speex
| `TrueAudio
| `WavPack ]

Supported file types. Warning, types: WavPack, Speex and TrueAudio are only supported in Taglib >= 1.5. Types: Mp4, Asf are only supported with Taglib >= 1.6.

type [< file_type ] file_tag 

Type for a file.

type [< file_type ] file = ([< file_type ] as 'a) file_tag Taglib.t 
exception Closed

Raised when using a file that has been closed

exception Not_implemented

Raised when using a file format not supported by the system's taglib library.

exception Invalid_file

Raised when taglib cannot parse a file.

val open_file : file_type -> string -> file_type file

Open a file.

Raises Not_found if file does not exist or could not be opened.

Raises Invalid_file if taglib could not parse the file.

Raises Not_implemented if given file_type is not implemented by taglib.

val close_file : file_type file -> unit
val file_save : file_type file -> bool
val file_type : file_type file -> file_type
val properties : file_type file ->
(string, string list) Stdlib.Hashtbl.t
val set_properties : file_type file ->
(string, string list) Stdlib.Hashtbl.t -> unit

Get audio properties interface

val audioproperties_length : file_type file -> int
val audioproperties_bitrate : file_type file -> int
val audioproperties_samplerate : file_type file -> int
val audioproperties_channels : file_type file -> int