pub fn create_file(
path: &Path,
target: WriteTarget,
) -> Result<File, WriteFailure>Expand description
Create or truncate path for writing, after the checks this module
describes. Missing parent directories are created.
ยงErrors
Returns WriteFailure::Directory when a parent directory cannot be
created. Returns WriteFailure::File with PermissionDenied when the
path resolves outside the recorded scope, or when a path component changed
while the parent directories were created, and with the error of the open
call when the final component became a symlink after the path was resolved
(Unix) or the file cannot be created.