summaryrefslogtreecommitdiff
path: root/src/Sandbox.hs
blob: a05a455ddfdfceff06a9644475cfb6137fae510d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module Sandbox (
    isolateFilesystem,
) where

import Foreign.C.String
import Foreign.C.Types

import System.Directory


isolateFilesystem :: FilePath -> IO Bool
isolateFilesystem rwDir = do
    absDir <- makeAbsolute rwDir
    withCString absDir c_isolate_fs >>= return . (== 0)

foreign import ccall unsafe "erebos_tester_isolate_fs" c_isolate_fs :: CString -> IO CInt