.. highlightlang:: us .. index:: updf_create_file .. _updf_create_file: updf_create_file ================ .. us.tag updf_create_file NOTREADYENGLISH updf updf-stor New560 Changed5505 Changed5509 :ref:`updf_create_file` creates a new updf file. .. function:: stg = updf_create_file(name) stg = updf_create_file(name, mode) .. us.return **Return Value** *stg* is a new storage object of an error object (see :ref:`error_create`). .. us.params **Parameters** .. uparam:: name *name* is the name of a updf file. If the name is set to ``:memory:`` the file will be saved in memory. .. uparam:: mode *mode* is one of the following values: .. list-table:: :header-rows: 0 * - UPDF_FAIL_IF_EXIST - If the file already exists the file will be not overwritten, instead an error-object will be returned. * - UPDF_REPACKING - If storages, streams or attribute are deleted the file will shrink in size. If this flag is not set the space will be used for new objects. * - UPDF_ZLIB_COMPRESSION - Improved compression with lower performance. * - UPDF_LZ4_COMPRESSION - Fast compression, see https://code.google.com/p/lz4/. .. us.example **Example** .. include:: ../include/test_updf_create_file.ic .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - R2013.9 - ``UPDF_LZ4_COMPRESSION``. * - R2013.5 - *name* can be set to ``:memory:``. * - 5.6.0 - New .. seealso:: :ref:`overview-updf-files`, :ref:`updf_open_file`, :ref:`updf_close_storage` :sub:`id-1891360`