extern "C" void file_storage_stat (const char *path, struct client client) { struct decafs_file_stat file_info; // If the file doesn't exist if ((decafs_file_sstat ((char *)path, &file_info, client)) < 0) { if (send_file_storage_stat_result (client, "File not found.") < 0) { printf("\tFile Storage Stat Result could not reach client.\n"); } return; } if (send_file_storage_stat_result( client, process_file_storage_stat (file_info)) < 0) { printf("\tFile Storage Stat Result could not reach client.\n"); } }
extern "C" void file_storage_stat(const char* filename, struct client client) { std::string str("this is a file storage stat response!"); send_file_storage_stat_result(client, str.c_str()); }