Constructor

CamelBlockFilenew

Declaration [src]

CamelBlockFile*
camel_block_file_new (
  const gchar* path,
  gint flags,
  const gchar* version,
  gsize block_size
)

Description [src]

Allocate a new block file, stored at path. version contains an 8 character version string which must match the head of the file, or the file will be intitialised.

block_size is currently ignored and is set to CAMEL_BLOCK_SIZE.

Parameters

path

Type: const gchar*

A path with file name of the new CamelBlockFile.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
flags

Type: gint

File open flags to use.

version

Type: const gchar*

A version string.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
block_size

Type: gsize

Block size, currently ignored.

Return value

Type: CamelBlockFile

The new block file, or NULL if it could not be created.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be NULL.