You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following potential operations are possible on paths which can be used as building blocks. These operations just split path on separators.
splitPath :: Path -> Stream m Path
foldComponents :: Stream m Char -> Fold m Char a -> Stream m a
components :: Stream m Char -> Stream m Path
On top of these we then need to:
filter empty components to remove duplicate separators like //. Or we can use uniq to remove consecutive separators in the input stream.
filter out /./ components
The next set of operations is to build a Path from path components:
combineComponents :: Stream m Path -> m Path
Note, for windows we may need to first split the path into drive and the remaining path. And then split the remaining path into components like posix.
We do not need a normalize operation, we need a good path equality check operation. We can do that by creating normalized path component streams for both paths and compare those.
The text was updated successfully, but these errors were encountered:
The following potential operations are possible on paths which can be used as building blocks. These operations just split path on separators.
On top of these we then need to:
//
. Or we can use uniq to remove consecutive separators in the input stream././
componentsThe next set of operations is to build a Path from path components:
Note, for windows we may need to first split the path into drive and the remaining path. And then split the remaining path into components like posix.
We do not need a normalize operation, we need a good path equality check operation. We can do that by creating normalized path component streams for both paths and compare those.
The text was updated successfully, but these errors were encountered: