úÎOÊM80      !"#$%&'()*+,-./ Trustworthy%Overloaded lenses for  and   "Lens for the value at a tree node "Lens for a list of children nodes CA representation of a filesystem tree. The root label contains the 4 path context, and every child node is a single file/directory name. BFor example, say we have the following directory structure on our  filesystem:    /"example$ tree foo --charset ASCII  foo  `-- bar  `-- test  |-- a  |-- A  | |-- x  | `-- y  |-- b  `-- B  then calling   "/example/foo/bar/test" will yield a FSTree with  the following structure:  /example$ ghci q Prelude Data.Tree System.Directory.Tree> putStrLn . drawTree . toTree =<< getDirectory "/example/foo/bar/test"  /example/foo/bar/test  |  +- A  | |  | +- x  | |  | `- y  |  +- B  |  +- a  |  `- b A pseudo-constructor for  . OLazily retrieves a representation of a directory and its contents recursively. LRelative paths are not converted to absolute. Thus, a FSTree formed from a  relative path will contain a " relative tree", and the usual caveats of F current directories and relative paths apply to the tree as a whole. A strict variant of  . QThough race conditionals are still a possibility, this function will avoid some J race conditions that could be caused from the use of lazy IO. For large ; directories, this function can easily cause memory leaks. #Checks if a path refers to a file. 'Checks if a path refer to a directory. +Checks if a path refers to a symbolic link <Checks if a path refers to a symbolically linked directory 6Checks if a path refers to a symbolically linked file BChecks if a path refers to a real directory (not a symbolic link) =Checks if a path refers to a real file (not a symbolic link) IRemove the root node of a filesystem tree, while preserving the paths of S its children. In other words, this function does not alter where any paths point  to.   pop_ = snd . pop MFlattens a filesystem tree into a list of its contents. This is a pre-order  traversal of the tree. /A post-order traversal of the filesystem tree. <Applies a function over the filepaths of a directory tree. Because we can't guarantee that the internal   representation is preserved % in any way, the result is a regular . AApplies a monadic action to every filepath in a filesystem tree.  with the result discarded. JApplies a predicate to each path name in a filesystem forest, and removes * all unsuccessful paths from the result. QNote that if a directory fails the predicate test, then all of its children are  removed as well. EFind all sub-forests within a forest that match the given predicate. A combination of a  and a &. This could be useful if you want to K handle certain directories specially from others within a sub-filesystem. Monadic . !Monadic . "Monadic . #CTruncate a tree to a given maximum level, where root is level 0. $MCopy a filesystem tree to a new location, creating directories as necessary.  The resulting  ) represents all of the copied directories/files in their  new home. >Note that an single exception will halt the entire operation. &;Move a filesystem tree to a new location, deleting any file/directory that , was present at the given destination path. IDirectories listed in the source filesystem tree are removed if the move < operation empties their contents completely. The resulting   represents  all the moved directories/files in their new home. >Note that an single exception will halt the entire operation. (This is similar to &6, except that whatever was present at the destination  path isn'/t deleted before the move operation commences. >Note that an single exception will halt the entire operation. *=Remove a given filesystem tree. Directories are only removed / if the remove operation empties its contents. >Note that an single exception will halt the entire operation. + A variant of *.  IOExceptions do not stop the removal  process, and all  IOExceptions. are accumulated into a list as the result of  the operation. , A variant of *=. Allows you to specify your own exception handler to handle ( exceptions for each removal operation. -HA generalization of the various move, copy, and remove operations. This  operation pairs each node of a  ( with a second path formed by rerooting 4 the filesystem tree to the given destination path. .Monadic - / A variant of .0 where the result is discarded and instead the ' rerooted filesystem tree is returned. -  !"#$%&'()*+,-./010  !"#$%&'()*+,-./0  $%&'()*+,! "#-./)   !"#$%&'()*+,-./012       !"#$%&'()*+,-./012345filesystem-trees-0.0System.File.Treecontainers-0.4.2.1 Data.Tree subForest rootLabelNodeTreeForestTreeLenslabelchildrenFSForestFSTreetoTreemkFSTree getDirectory getDirectory'isFileisDir isSymLinkisSymDir isSymFile isRealDir isRealFilepoppop_flattenflattenPostOrdermapmapMmapM_filterfindextractfilterMfindMextractM truncateAtcopyTocopyTo_moveTomoveTo_ mergeInto mergeInto_remove tryRemove tryRemoveWith zipWithDest zipWithDestM zipWithDestM_$fTreeLensFSTree[]$fTreeLensTreea