NuDB Logo

PrevUpHomeNext

posix_file::create

Create a new file.

void
create(
    file_mode mode,
    path_type const& path,
    error_code& ec);

After the file is created, it is opened as if by open(mode, path, ec).

Requirements

The file must not already exist, or else errc::file_exists is returned.

Parameters

mode

The open mode, which must be a valid file_mode.

path

The path of the file to create.

ec

Set to the error, if any occurred.


PrevUpHomeNext