4646--
4747-- Naming: unary predicates are either isSomething or hasSomething. Binary
4848-- predicates are nouns. Predicates are named so that they read well on the
49- -- call site e.g. "test path doesExist " or "test path isReadable".
49+ -- call site e.g. "test path doesItExist " or "test path isReadable".
5050--
5151-- Files supported by windows:
5252--
@@ -102,7 +102,7 @@ module Streamly.Coreutils.FileTest.Common
102102 -- * Predicates
103103
104104 -- ** General
105- , doesExist
105+ , doesItExist
106106
107107 -- ** File Type
108108 , isDir
@@ -418,7 +418,7 @@ applyCatchENOENT f fs =
418418-- to lack of permissions. The exception type can be used to determine the
419419-- reason for failure.
420420-- * test 'isSymLink' always returns false.
421- -- * test 'doesExist ' returns false if the path is symlink but it does not
421+ -- * test 'doesItExist ' returns false if the path is symlink but it does not
422422-- point to an existing file.
423423--
424424test :: FilePath -> FileTest -> IO Bool
@@ -430,7 +430,7 @@ test path (FileTest (Predicate f)) = do
430430-- symlink.
431431--
432432-- * 'isSymLink' returns true if path is a symlink, false otherwise.
433- -- * 'doesExist ' returns true if the link exists irrespective of whether it
433+ -- * 'doesItExist ' returns true if the link exists irrespective of whether it
434434-- points to an existing file.
435435-- * Predicates related to file permission mode bits are meaningless, and
436436-- should not be used.
@@ -493,19 +493,17 @@ false = FileTest $ Predicate $ const (pure False)
493493-- with anything else. But as a FileTest the same predicate can be used with
494494-- either "test" or "testl" to execute the predicate.
495495
496- -- XXX Rename to doesItExist or pathExists
497-
498496-- | True if the path exists. In case of symlink whether it tests the link file
499497-- or the file pointed to by it depends on whether you use 'test' or 'testl' to
500498-- execute the predicate.
501499--
502500-- Like coreutil @test -e file@
503- doesExist :: FileTest
504- doesExist = withStatus (const True )
501+ doesItExist :: FileTest
502+ doesItExist = withStatus (const True )
505503
506- {-# DEPRECATED isExisting "Use doesExist instead." #-}
504+ {-# DEPRECATED isExisting "Use doesItExist instead." #-}
507505isExisting :: FileTest
508- isExisting = doesExist
506+ isExisting = doesItExist
509507
510508---------------
511509-- Type of file
0 commit comments