Safe Haskell | None |
---|---|
Language | Haskell98 |
- data Mode :: *
- unsafeMMapMVector :: forall a. Storable a => FilePath -> Mode -> Maybe (Int64, Int) -> IO (MVector (PrimState IO) a)
- unsafeMMapVector :: forall a. Storable a => FilePath -> Maybe (Int64, Int) -> IO (Vector a)
- writeMMapVector :: forall v a. (Storable a, Vector v a) => FilePath -> v a -> IO ()
Documentation
Mode of mapping. Four cases are supported.
ReadOnly | file is mapped read-only, file must exist |
ReadWrite | file is mapped read-write, file must exist |
WriteCopy | file is mapped read-write, but changes aren't propagated to disk, file must exist |
ReadWriteEx | file is mapped read-write, if file does not exist it will be created with default permissions, region parameter specifies size, if file size is lower it will be extended with zeros |
:: Storable a | |
=> FilePath | Path of the file to map |
-> Mode | Mapping mode |
-> Maybe (Int64, Int) |
|
-> IO (MVector (PrimState IO) a) |
Map a file into memory as a mutable vector.