Skip to content

Refactor remaining code to use *at APIs #183

Open
@Rufflewind

Description

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

-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

Metadata

Assignees

No one assigned

    Labels

    type: b-cleanupCleanup / refactoring changes.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions