Movatterモバイル変換


[0]ホーム

URL:


pandoc-3.6.4: Conversion between markup formats
CopyrightCopyright (C) 2016-2020 Jesse Rosenthal John MacFarlane
LicenseGNU GPL, version 2 or above
MaintainerJesse Rosenthal <jrosenthal@jhu.edu>
Stabilityalpha
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Pandoc.Class.IO

Description

Default ways to performPandocMonad actions in aMonadIO type.

These functions are used to make thePandocIO type an instance ofPandocMonad, but can be reused for any other MonadIO-conformingtypes.

Synopsis

Documentation

fileExists :: (PandocMonad m,MonadIO m) =>FilePath -> mBoolSource#

Returns True if file exists.

getCurrentTime ::MonadIO m => mUTCTimeSource#

Get the current (UTC) time.

getCurrentTimeZone ::MonadIO m => mTimeZoneSource#

Get the locale's time zone.

getDataFileName :: (PandocMonad m,MonadIO m) =>FilePath -> mFilePathSource#

Returns the path of data file.

getModificationTime :: (PandocMonad m,MonadIO m) =>FilePath -> mUTCTimeSource#

Return the modification time of a file.

glob :: (PandocMonad m,MonadIO m) =>String -> m [FilePath]Source#

Return a list of paths that match a glob, relative to the working directory. SeeGlob for the glob syntax.

logOutput :: (PandocMonad m,MonadIO m) =>LogMessage -> m ()Source#

Output a log message.

logIOError :: (PandocMonad m,MonadIO m) =>IO () -> m ()Source#

Show potential IO errors to the user continuing execution anyway

lookupEnv ::MonadIO m =>Text -> m (MaybeText)Source#

Lookup an environment variable in the programs environment.

newStdGen ::MonadIO m => mStdGenSource#

Return a new generator for random numbers.

newUniqueHash ::MonadIO m => mIntSource#

Return a new unique integer.

openURL :: (PandocMonad m,MonadIO m) =>Text -> m (ByteString,MaybeMimeType)Source#

readFileLazy :: (PandocMonad m,MonadIO m) =>FilePath -> mByteStringSource#

Read the lazy ByteString contents from a file path, raising an error on failure.

readFileStrict :: (PandocMonad m,MonadIO m) =>FilePath -> mByteStringSource#

Read the strict ByteString contents from a file path, raising an error on failure.

readStdinStrict :: (PandocMonad m,MonadIO m) => mByteStringSource#

Read the strict ByteString contents from stdin, raising an error on failure.

extractMedia :: (PandocMonad m,MonadIO m) =>FilePath ->Pandoc -> mPandocSource#

Extract media from the mediabag into a directory.

writeMedia :: (PandocMonad m,MonadIO m) =>FilePath -> (FilePath,MimeType,ByteString) -> m ()Source#

Write the contents of a media bag to a path. If the path contains URI escape sequences (percent-encoding), these are resolved.

Produced byHaddock version 2.29.1


[8]ページ先頭

©2009-2025 Movatter.jp