Function esp_idf_sys::esp_vfs_fat_create_contiguous_file

source ·
pub unsafe extern "C" fn esp_vfs_fat_create_contiguous_file(
    base_path: *const c_char,
    full_path: *const c_char,
    size: u64,
    alloc_now: bool,
) -> esp_err_t
Expand description

@brief Create a file with contiguous space at given path

@note The file cannot exist before calling this function (or the file size has to be 0) For more information see documentation for f_expand from FATFS library

@param base_path Base path of the partition examined (e.g. “/spiflash”) @param full_path Full path of the file (e.g. “/spiflash/ABC.TXT”) @param size File size expanded to, number of bytes in size to prepare or allocate for the file @param alloc_now True == allocate space now, false == prepare to allocate – see f_expand from FATFS @return - ESP_OK on success - ESP_ERR_INVALID_ARG if invalid arguments (e.g. any of arguments are NULL or size lower or equal to 0) - ESP_ERR_INVALID_STATE if partition not found - ESP_FAIL if another FRESULT error (saved in errno)