#include <stdint.h>
Go to the source code of this file.
Typedefs | |
typedef void(* | ipod_file_transfer_func )(uint64_t transferred, uint64_t total, void *userData) |
Callback used during file transfers. | |
Functions | |
int | ipod_directory_exists (const char *path) |
Test for the existence of a directory. | |
int | ipod_file_exists (const char *path) |
Test for the existence of a file. | |
void | ipod_delete_file (const char *path) |
Delete a file. | |
int | ipod_copy_file (const char *srcFile, const char *dstFile, ipod_file_transfer_func callback, void *userData) |
Copy a file from one location to another. | |
const char * | ipod_extension_of (const char *path, const char *def) |
Returns a pointer to the extension of the file, including the dot. | |
const char * | ipod_file_name_of (const char *path) |
Locate the filename in a full file path. |
typedef void(* ipod_file_transfer_func)(uint64_t transferred, uint64_t total, void *userData) |
Callback used during file transfers.
transferred | the number of bytes transferred so far | |
total | the total numb er of bytes to be transferred | |
userData | application-specific data |
int ipod_copy_file | ( | const char * | srcFile, | |
const char * | dstFile, | |||
ipod_file_transfer_func | callback, | |||
void * | userData | |||
) |
Copy a file from one location to another.
srcFile | the file to be copied | |
dstFile | the location to which to copy the file | |
callback | the function to call during the copy to report progess information | |
userData | application-specific data to provide to the callback function |
void ipod_delete_file | ( | const char * | path | ) |
Delete a file.
path | a path to a file to be deleted |
int ipod_directory_exists | ( | const char * | path | ) |
Test for the existence of a directory.
path | a path to a directory |
const char* ipod_extension_of | ( | const char * | path, | |
const char * | def | |||
) |
Returns a pointer to the extension of the file, including the dot.
path | a file path | |
def | a string to return if no extension can be found |
printf(ipod_extension_of("/home/jayne/hero_of_canton.mp3",".wav")); -> ".mp3"
int ipod_file_exists | ( | const char * | path | ) |
Test for the existence of a file.
path | a path to a file |
const char* ipod_file_name_of | ( | const char * | path | ) |
Locate the filename in a full file path.
path | a full file path |
printf(ipod_file_name_of("/home/jayne/hero_of_canton.mp3")); -> "hero_of_canton.mp3"