hscdio-0.1.0.0: src/Sound/Libcdio/Read/Filesystem.hs
{-|
Description: Objects used to describe the CD and filesystem format.
Copyright: (c) 2020-2021 Sam May
License: GPL-3.0-or-later
Maintainer: ag@eitilt.life
Stability: stable
Portability: non-portable (requires libcdio)
Like any drive, discs may store their data according to many different
filesystem structures. These are abstracted to a degree in libcdio, but as
each track may store its data differently, and at the very least
'Foreign.Audio' is handled differently than any of the file-oriented layouts,
it is still helpful to know the underlying structure. This module, then, is a
counterpart to "Sound.Libcdio.Read.Data", providing information about the
/structure/ for the latter's retrieval of /data/.
-}
module Sound.Libcdio.Read.Filesystem
( -- * Types
Foreign.Filesystem ( .. )
, Foreign.FilesystemClass ( .. )
, Foreign.FilesystemClasses
, Foreign.fsAny
, Foreign.fsAnyVcd
, Foreign.IsoAnalysis ( .. )
-- * Query
, trackType
) where
import qualified Foreign.Libcdio.CdTypes as Foreign
import Sound.Libcdio.Track
import Sound.Libcdio.Types.Cdio
-- | Determine what type of file system is stored in the given track of a disc.
trackType :: Track -> Cdio (Maybe Foreign.Filesystem, Foreign.FilesystemClasses, Maybe Foreign.IsoAnalysis)
trackType = liftCdio . flip Foreign.trackType