Updated documentation
This commit is contained in:
parent
20b6fdbc82
commit
f2e12dcde5
1 changed files with 5 additions and 3 deletions
|
@ -150,6 +150,9 @@ reparsePoint :: Win32.FileAttributeOrFlag -> Bool
|
||||||
reparsePoint attr = fILE_ATTRIBUTE_REPARSE_POINT .&. attr /= 0
|
reparsePoint attr = fILE_ATTRIBUTE_REPARSE_POINT .&. attr /= 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
{-| List all immediate children of the given directory, excluding @\".\"@ and
|
||||||
|
@\"..\"@
|
||||||
|
-}
|
||||||
ls :: FilePath -> Shell FilePath
|
ls :: FilePath -> Shell FilePath
|
||||||
ls path = Shell (\(FoldM step begin done) -> do
|
ls path = Shell (\(FoldM step begin done) -> do
|
||||||
x0 <- begin
|
x0 <- begin
|
||||||
|
@ -189,6 +192,7 @@ ls path = Shell (\(FoldM step begin done) -> do
|
||||||
else done x0 )
|
else done x0 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
-- | List all recursive descendents of the given directory
|
||||||
lsTree :: FilePath -> Shell FilePath
|
lsTree :: FilePath -> Shell FilePath
|
||||||
lsTree path = do
|
lsTree path = do
|
||||||
child <- ls path
|
child <- ls path
|
||||||
|
@ -209,9 +213,6 @@ mkdir = Filesystem.createDirectory False
|
||||||
mktree :: FilePath -> IO ()
|
mktree :: FilePath -> IO ()
|
||||||
mktree = Filesystem.createTree
|
mktree = Filesystem.createTree
|
||||||
|
|
||||||
-- List the immediate children of a directory, excluding @\".\"@ and @\"..\"@
|
|
||||||
-- ls :: FilePath -> Shell String
|
|
||||||
|
|
||||||
-- | Copy a file
|
-- | Copy a file
|
||||||
cp :: FilePath -> FilePath -> IO ()
|
cp :: FilePath -> FilePath -> IO ()
|
||||||
cp = Filesystem.copyFile
|
cp = Filesystem.copyFile
|
||||||
|
@ -254,6 +255,7 @@ sed pattern s = do
|
||||||
txt':_ <- return (match pattern' txt)
|
txt':_ <- return (match pattern' txt)
|
||||||
return txt'
|
return txt'
|
||||||
|
|
||||||
|
-- | A Stream of @\"y\"@s
|
||||||
yes :: Shell Text
|
yes :: Shell Text
|
||||||
yes = Shell (\(FoldM step begin _) -> do
|
yes = Shell (\(FoldM step begin _) -> do
|
||||||
x0 <- begin
|
x0 <- begin
|
||||||
|
|
Loading…
Reference in a new issue