createFile method

  1. @override
Future<void> createFile(
  1. String absPath
)
override

Creates an empty file at absPath (with parent directories).

Implementation

@override
Future<void> createFile(String absPath) async {
  _check(
    await _run(
      'mkdir -p -- "\$(dirname -- ${_q(absPath)})" && '
      'touch -- ${_q(absPath)}',
      windows: windowsCreateFileScript(absPath),
    ),
    'create',
    absPath,
  );
}