createFile method
void
createFile(})
override
Creates an empty file at path
.
If errorIfAlreadyExists
is set to true, and a file already exists at
path
, a FileSystemException is thrown.
Implementation
@override
void createFile(
String path, {
bool errorIfNotExists = false,
bool errorIfAlreadyExists = false,
}) {
_checkClosed();
final existsBefore = _memory.exists(path);
_memory.createFile(
path,
errorIfAlreadyExists: errorIfAlreadyExists,
errorIfNotExists: errorIfNotExists,
);
if (!existsBefore) {
_submitWork(_CreateFileWorkItem(this, path));
}
}