definition:
|
clearCache :: String -> ErrorLogger ()
clearCache pkgDir = do
cacheExists <- liftIOEL $ doesDirectoryExist cdir
if cacheExists
then do
pkgDirs <- liftIOEL $ getDirectoryContents cdir
mapM deleteIfLink (map (cdir </>) $ filter (not . isDotOrDotDot) pkgDirs)
return ()
else return ()
where
cdir = cacheDir pkgDir
|
demand:
|
no demanded arguments
|
deterministic:
|
deterministic operation
|
documentation:
|
--- Clear the local package cache.
---
--- @param dir the package directory
|
failfree:
|
<FAILING>
|
indeterministic:
|
referentially transparent operation
|
infix:
|
no fixity defined
|
iotype:
|
{(_) |-> _}
|
name:
|
clearCache
|
precedence:
|
no precedence defined
|
result-values:
|
_
|
signature:
|
String -> CPM.ErrorLogger.ErrorLogger ()
|
solution-complete:
|
operation might suspend on free variables
|
terminating:
|
possibly non-terminating
|
totally-defined:
|
possibly non-reducible on same data term
|