Defines additional functions like load_file and save_file.
File-Util | Defines additional functions like load_file and save_file. |
Copyright | This program is free software. |
Files | |
C-kern/ | Header file File-Util. |
C-kern/ | Implementation file File-Util impl. |
Functions | |
load_file | Loads content of file and appends it to result. |
save_file | Creates file and writes file_content into it. |
test | |
unittest_io_fileutil | Test additional functionality implemented for file_t. |
This program is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
© 2013 Jörg Seebohn
Header file File-Util.
Implementation file File-Util impl.
load_file | Loads content of file and appends it to result. |
save_file | Creates file and writes file_content into it. |
test | |
unittest_io_fileutil | Test additional functionality implemented for file_t. |
int save_file( const char * filepath, size_t file_size, const void * file_content/*[filer_size]*/, struct directory_t * relative_to )
Creates file and writes file_content into it.
0 | File created and file_size bytes of file_content written into it. |
EEXIST | File already exists. Nothing was done. |
EIO | File created and deleted after a write error occurred. |
int unittest_io_fileutil( void )
Test additional functionality implemented for file_t.
Loads content of file and appends it to result.
int load_file( const char * filepath, /*ret*/struct wbuffer_t * result, struct directory_t * relative_to )
Creates file and writes file_content into it.
int save_file( const char * filepath, size_t file_size, const void * file_content/*[filer_size]*/, struct directory_t * relative_to )
Test additional functionality implemented for file_t.
int unittest_io_fileutil( void )
Export file_t, alias for sys_iochannel_t.
typedef sys_iochannel_t file_t