[commit: packages/filepath] master: #44, clarify that isValid doesn't check length limits (f8fb100)

git at git.haskell.org git at git.haskell.org
Mon Dec 28 20:39:09 UTC 2015


Repository : ssh://git@git.haskell.org/filepath

On branch  : master
Link       : http://git.haskell.org/packages/filepath.git/commitdiff/f8fb100351b250a5e126bb6aefcb017174fd320c

>---------------------------------------------------------------

commit f8fb100351b250a5e126bb6aefcb017174fd320c
Author: Neil Mitchell <ndmitchell at gmail.com>
Date:   Thu Apr 23 20:53:39 2015 +0100

    #44, clarify that isValid doesn't check length limits


>---------------------------------------------------------------

f8fb100351b250a5e126bb6aefcb017174fd320c
 System/FilePath/Internal.hs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/System/FilePath/Internal.hs b/System/FilePath/Internal.hs
index 42bc19b..57355d1 100644
--- a/System/FilePath/Internal.hs
+++ b/System/FilePath/Internal.hs
@@ -840,7 +840,9 @@ badElements :: [FilePath]
 badElements = ["CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9", "CLOCK$"]
 
 
--- | Is a FilePath valid, i.e. could you create a file like it?
+-- | Is a FilePath valid, i.e. could you create a file like it? This function checks for invalid names,
+--   and invalid characters, but does not check if length limits are exceeded, as these are typically
+--   filesystem dependent.
 --
 -- >          isValid "" == False
 -- >          isValid "\0" == False



More information about the ghc-commits mailing list