FILE

Synopsis

HELP:   Single binary file
TYPE:   OBJECT
SYNTAX: FILE(NET.{},NAME/FILE='str',NOMKDIR,FLUSH,ATTRIB(),OVERWRITE)

Description

Use single binary flat file as archive format for write.

The file can be specified in the form of a URL in order to write the archive remotely. The NET overlay is also available for this purpose. The file name can be supplemented here with a number in parenthesis, which is ignored in this case. This means that a new version/generation is always written unless the OVERWRITE switch is set, which forces the archive to be deleted before writing. Another switch can be used to force the flush of the data so that you can be sure that everything has been written. The NOMKDIR switch can be used to prevent the creation of directories for the file, which would otherwise be done automatically. You can also define the access rights and determine the sizes for internal buffering.

NOMKDIR, FLUSH and ATTRIB are the write options that the FIO modules have always had, and a segment store now acts on all three:

NOMKDIR Without it a parent folder that does not exist yet is created and the open is retried once. With it the open fails instead and nothing is created. Use it when the caller lays out the paths and wants a missing folder to be an error rather than a directory tree nobody asked for.

FLUSH Syncs the file to disk before it is closed, so that you can be sure that everything has been written. A failing sync is reported as a warning; the archive itself stays valid.

ATTRIB Sets the access rights of the archive file, after the archive has been closed, so that the mode cannot interfere with the write. A failing attribute call is reported as a warning. The rights of the archive file are no part of the archive: a member keeps the rights of the original file it was built from, and those are the rights that an archive list reports.

Arguments