Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Types for monitoring files and directories.
Synopsis
- data RootedGlob = RootedGlob FilePathRoot Glob
- data FilePathRoot
- data Glob
- data MonitorFilePath
- data MonitorKindFile
- data MonitorKindDir
- monitorFile :: FilePath -> MonitorFilePath
- monitorFileHashed :: FilePath -> MonitorFilePath
- monitorNonExistentFile :: FilePath -> MonitorFilePath
- monitorFileExistence :: FilePath -> MonitorFilePath
- monitorDirectory :: FilePath -> MonitorFilePath
- monitorNonExistentDirectory :: FilePath -> MonitorFilePath
- monitorDirectoryExistence :: FilePath -> MonitorFilePath
- monitorFileOrDirectory :: FilePath -> MonitorFilePath
- monitorFileGlob :: RootedGlob -> MonitorFilePath
- monitorFileGlobExistence :: RootedGlob -> MonitorFilePath
- monitorFileSearchPath :: [FilePath] -> FilePath -> [MonitorFilePath]
- monitorFileHashedSearchPath :: [FilePath] -> FilePath -> [MonitorFilePath]
Globs with respect to a root
data RootedGlob Source #
A file path specified by globbing, relative to some root directory.
RootedGlob | |
|
Instances
data FilePathRoot Source #
FilePathRelative | |
FilePathRoot FilePath | e.g. |
FilePathHomeDir |
Instances
A filepath specified by globbing.
Instances
Parsec Glob Source # | |
Defined in Distribution.Simple.Glob.Internal parsec :: CabalParsing m => m Glob Source # | |
Pretty Glob Source # | |
Defined in Distribution.Simple.Glob.Internal pretty :: Glob -> Doc Source # prettyVersioned :: CabalSpecVersion -> Glob -> Doc Source # | |
Structured Glob Source # | |
Defined in Distribution.Simple.Glob.Internal | |
Generic Glob Source # | |
Show Glob Source # | |
Binary Glob Source # | |
Eq Glob Source # | |
type Rep Glob Source # | |
Defined in Distribution.Simple.Glob.Internal type Rep Glob = D1 ('MetaData "Glob" "Distribution.Simple.Glob.Internal" "Cabal-3.13.0.0-inplace" 'False) ((C1 ('MetaCons "GlobDir" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GlobPieces) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Glob)) :+: C1 ('MetaCons "GlobDirRecursive" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GlobPieces))) :+: (C1 ('MetaCons "GlobFile" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GlobPieces)) :+: C1 ('MetaCons "GlobDirTrailing" 'PrefixI 'False) (U1 :: Type -> Type))) |
File monitoring
data MonitorFilePath Source #
A description of a file (or set of files) to monitor for changes.
Where file paths are relative they are relative to a common directory (e.g. project root), not necessarily the process current directory.
Instances
Structured MonitorFilePath Source # | |
Defined in Distribution.Simple.FileMonitor.Types structure :: Proxy MonitorFilePath -> Structure Source # structureHash' :: Tagged MonitorFilePath MD5 | |
Generic MonitorFilePath Source # | |
Defined in Distribution.Simple.FileMonitor.Types type Rep MonitorFilePath :: Type -> Type from :: MonitorFilePath -> Rep MonitorFilePath x to :: Rep MonitorFilePath x -> MonitorFilePath | |
Show MonitorFilePath Source # | |
Defined in Distribution.Simple.FileMonitor.Types showsPrec :: Int -> MonitorFilePath -> ShowS # show :: MonitorFilePath -> String # showList :: [MonitorFilePath] -> ShowS # | |
Binary MonitorFilePath Source # | |
Defined in Distribution.Simple.FileMonitor.Types | |
Eq MonitorFilePath Source # | |
Defined in Distribution.Simple.FileMonitor.Types (==) :: MonitorFilePath -> MonitorFilePath -> Bool # (/=) :: MonitorFilePath -> MonitorFilePath -> Bool # | |
type Rep MonitorFilePath Source # | |
Defined in Distribution.Simple.FileMonitor.Types type Rep MonitorFilePath = D1 ('MetaData "MonitorFilePath" "Distribution.Simple.FileMonitor.Types" "Cabal-3.13.0.0-inplace" 'False) (C1 ('MetaCons "MonitorFile" 'PrefixI 'True) (S1 ('MetaSel ('Just "monitorKindFile") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MonitorKindFile) :*: (S1 ('MetaSel ('Just "monitorKindDir") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MonitorKindDir) :*: S1 ('MetaSel ('Just "monitorPath") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FilePath))) :+: C1 ('MetaCons "MonitorFileGlob" 'PrefixI 'True) (S1 ('MetaSel ('Just "monitorKindFile") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MonitorKindFile) :*: (S1 ('MetaSel ('Just "monitorKindDir") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MonitorKindDir) :*: S1 ('MetaSel ('Just "monitorPathGlob") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RootedGlob)))) |
data MonitorKindFile Source #
Instances
data MonitorKindDir Source #
Instances
Utility constructors of MonitorFilePath
monitorFile :: FilePath -> MonitorFilePath Source #
Monitor a single file for changes, based on its modification time. The monitored file is considered to have changed if it no longer exists or if its modification time has changed.
monitorFileHashed :: FilePath -> MonitorFilePath Source #
Monitor a single file for changes, based on its modification time and content hash. The monitored file is considered to have changed if it no longer exists or if its modification time and content hash have changed.
monitorNonExistentFile :: FilePath -> MonitorFilePath Source #
Monitor a single non-existent file for changes. The monitored file is considered to have changed if it exists.
monitorFileExistence :: FilePath -> MonitorFilePath Source #
Monitor a single file for existence only. The monitored file is considered to have changed if it no longer exists.
monitorDirectory :: FilePath -> MonitorFilePath Source #
Monitor a single directory for changes, based on its modification time. The monitored directory is considered to have changed if it no longer exists or if its modification time has changed.
monitorNonExistentDirectory :: FilePath -> MonitorFilePath Source #
Monitor a single non-existent directory for changes. The monitored directory is considered to have changed if it exists.
monitorDirectoryExistence :: FilePath -> MonitorFilePath Source #
Monitor a single directory for existence. The monitored directory is considered to have changed only if it no longer exists.
monitorFileOrDirectory :: FilePath -> MonitorFilePath Source #
Monitor a single file or directory for changes, based on its modification time. The monitored file is considered to have changed if it no longer exists or if its modification time has changed.
monitorFileGlob :: RootedGlob -> MonitorFilePath Source #
Monitor a set of files (or directories) identified by a file glob. The monitored glob is considered to have changed if the set of files matching the glob changes (i.e. creations or deletions), or for files if the modification time and content hash of any matching file has changed.
monitorFileGlobExistence :: RootedGlob -> MonitorFilePath Source #
Monitor a set of files (or directories) identified by a file glob for existence only. The monitored glob is considered to have changed if the set of files matching the glob changes (i.e. creations or deletions).
monitorFileSearchPath :: [FilePath] -> FilePath -> [MonitorFilePath] Source #
Creates a list of files to monitor when you search for a file which
unsuccessfully looked in notFoundAtPaths
before finding it at
foundAtPath
.
monitorFileHashedSearchPath :: [FilePath] -> FilePath -> [MonitorFilePath] Source #
Similar to monitorFileSearchPath
, but also instructs us to
monitor the hash of the found file.