[][src]Function flac_sys::FLAC__metadata_chain_check_if_tempfile_needed

pub unsafe extern "C" fn FLAC__metadata_chain_check_if_tempfile_needed(
    chain: *mut FLAC__Metadata_Chain,
    use_padding: FLAC__bool
) -> FLAC__bool

Checks if writing the given chain would require the use of a temporary file, or if it could be written in place.

Under certain conditions, padding can be utilized so that writing edited metadata back to the FLAC file does not require rewriting the entire file. If rewriting is required, then a temporary workfile is required. When writing metadata using callbacks, you must check this function to know whether to call FLAC__metadata_chain_write_with_callbacks() or FLAC__metadata_chain_write_with_callbacks_and_tempfile(). When writing with FLAC__metadata_chain_write(), the temporary file is handled internally.

\param chain A pointer to an existing chain. \param use_padding Whether or not padding will be allowed to be used during the write. The value of \a use_padding given here must match the value later passed to FLAC__metadata_chain_write_with_callbacks() or FLAC__metadata_chain_write_with_callbacks_with_tempfile(). \assert \code chain != NULL \endcode \retval FLAC__bool \c true if writing the current chain would require a tempfile, or \c false if metadata can be written in place.