private MemoryMappedFile CreateOrOpen(string name, long capacity, bool createdNew)
{
#if __MonoCS__
name = Path.Combine(m_commitLogDir, name);
// delete old file that could be left after a crash
if (createdNew && File.Exists(name))
File.Delete(name);
// Mono only supports memory mapped files that are backed by an actual file
if (!File.Exists(name))
{
using (var fs = new FileStream(name, FileMode.CreateNew))
fs.SetLength(capacity);
}
#endif
return MemoryMappedFile.CreateOrOpen(name, capacity);
}