File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
core/src/Streamly/Internal/FileSystem/Path Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -485,12 +485,24 @@ append :: (Unbox a, Integral a) =>
485485append os toStr a b =
486486 withAppendCheck os toStr b (doAppend os a b)
487487
488- -- |
488+ -- | Split a path into components separated by the path separator. "."
489+ -- components in the path are ignored except in the leading position. Multiple
490+ -- consecutive separators are ignored.
491+ --
489492-- >>> :{
490493-- splitPath Common.Posix = Stream.toList . fmap unpackPosix . Common.splitPath Common.Posix . packPosix
491494-- splitPath Common.Windows = Stream.toList . fmap unpackWindows . Common.splitPath Common.Windows . packWindows
492495-- :}
493496--
497+ -- >>> splitPath Common.Posix "."
498+ -- ["."]
499+ --
500+ -- >>> splitPath Common.Posix "././"
501+ -- ["."]
502+ --
503+ -- >>> splitPath Common.Posix "./a/b/."
504+ -- [".","a","b"]
505+ --
494506-- >>> splitPath Common.Posix "home//user/./..////\\directory/."
495507-- ["home","user","..","\\directory"]
496508--
You can’t perform that action at this time.
0 commit comments