W3cubDocs

/Dart 2

createSync method

void createSync ({bool recursive: false })

Synchronously create the file. Existing files are left untouched by createSync. Calling createSync on an existing file might fail if there are restrictive permissions on the file.

If recursive is false, the default, the file is created only if all directories in the path exist. If recursive is true, all non-existing path components are created.

Throws a FileSystemException if the operation fails.

Implementation

void createSync({bool recursive: false});

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-io/File/createSync.html