openMmapFileSync function
Synchronous open.
Implementation
MmapFile openMmapFileSync(
String path, {
bool create = true,
bool readOnly = false,
bool direct = false,
bool largePages = false,
bool mmapCache = true,
}) {
if (Platform.isWindows) {
return WindowsMmapFile.openSync(
path,
create: create,
readOnly: readOnly,
direct: direct,
largePages: largePages,
mmapCache: mmapCache,
);
}
if (largePages) {
throw UnsupportedError('large pages are only implemented on Windows');
}
return PosixMmapFile.openSync(
path,
create: create,
readOnly: readOnly,
direct: direct,
mmapCache: mmapCache,
);
}