haskell / haskell/directory

Refactor remaining code to use *at APIs

Open
#183 0 comments 0 reactions 0 assignees View on GitHub
type: (4) cleanup
Dominant language
Haskell
Stars
65
Forks
52
PR merge metrics
No merged PRs in 30d

Description

With the changes in 14f5851fd55b0a1a546b4cc8f9459bebeac0b71c we could try refactoring some of the other functionality to also use similar `*at` OS APIs.

```diff
-getDirectoryContentsInternal (OsString path) =
+getDirectoryContentsInternal path =
- bracket (Posix.openDirStream path) Posix.closeDirStream
+ bracket (openRawHandle FollowLinks Nothing path) closeRawHandle readDirHandle

-removePathInternal True = Posix.removeDirectory . getOsString
+removePathInternal True = removePathAt Directory Nothing

-removePathInternal False = Posix.removeLink . getOsString
+removePathInternal False = removePathAt File Nothing

getSymbolicLinkMetadata ...
getFileMetadata ...

etc
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.