Some directory file function renamings

This allows us to build Idris2 proper again
This commit is contained in:
Edwin Brady 2020-05-24 20:29:49 +01:00
parent e2ef9e05eb
commit a5c9ce9306
3 changed files with 7 additions and 7 deletions

View File

@ -1,6 +1,6 @@
##### Options which a user might set before building go here #####
PREFIX ?= $(HOME)/.idris2
PREFIX ?= $(HOME)/.idris2boot
# Add any optimisation/profiling flags for C here (e.g. -O2)
OPT =

View File

@ -71,16 +71,16 @@ currentDir
else pure (Just (prim__getString res))
export
dirOpen : String -> IO (Either FileError Directory)
dirOpen d
openDir : String -> IO (Either FileError Directory)
openDir d
= do res <- primIO (prim_openDir d)
if prim__nullAnyPtr res /= 0
then returnError
else ok (MkDir res)
export
dirClose : Directory -> IO ()
dirClose (MkDir d) = primIO (prim_closeDir d)
closeDir : Directory -> IO ()
closeDir (MkDir d) = primIO (prim_closeDir d)
export
dirEntry : Directory -> IO (Either FileError String)

View File

@ -210,8 +210,8 @@ fileStatusTime (FHandle f)
else returnError
export
fileRemove : String -> IO (Either FileError ())
fileRemove fname
removeFile : String -> IO (Either FileError ())
removeFile fname
= do res <- primIO (prim__fileRemove fname)
if res == 0
then ok ()