Main Page | Modules | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

rw_datafolder.c File Reference

#include <hiker/bundlemgr.h>
#include <hiker/prv/bundlemgr_prv.h>
#include <hiker/ipc.h>
#include <string.h>
#include <stdlib.h>
#include <sqlite3.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>
#include <hiker/fail.h>
#include <errno.h>
#include <fcntl.h>
#include "pm_traces.h"
#include "pm_globals.h"
#include "pm_ipc.h"
#include "pm_sql.h"
#include "pm_refimpl.h"
#include "pm_msg.h"
#include "pm_perms.h"

Functions

gchar * alp_bundle_rw_pathname (AlpBundle index, const char *path, gboolean vivify)
 Returns the path to the R/W data folder for a bundle.
void handle_client_alp_bundle_rw_pathname (AlpConnection *connection, AlpMessage *message, gpointer cbData)
alp_status_t alp_bundle_rw_delete (AlpBundle index, const char *folder_path, gboolean itself)
 Delete some or all files within a bundles R/W data folder As a convenience, you can easily delete all of the R/W data for a bundle, or a subset of that data, using this routine.
void handle_client_alp_bundle_rw_delete (AlpConnection *connection, AlpMessage *message, gpointer cbData)
int alp_prv_associated_data (const char *name)


Function Documentation

alp_status_t alp_bundle_rw_delete AlpBundle  index,
const char *  folder_path,
gboolean  itself
 

Delete some or all files within a bundles R/W data folder As a convenience, you can easily delete all of the R/W data for a bundle, or a subset of that data, using this routine.

If the supplied file_path is empty (""), then all data will be removed, otherwise only data in a folder matching the supplied path.

Parameters:
[in] index 
[in] folder_path 
[in] itself If FALSE then only the contents of the named folder will be removed, and not the folder itself.
Returns:
Non-zero value if the deletion was not successfull

gchar* alp_bundle_rw_pathname AlpBundle  index,
const char *  file_path,
gboolean  vivify
 

Returns the path to the R/W data folder for a bundle.

This routine will automatically make any folders necessary. I.e., a call to alp_bundle_rw_pathname(pkg, "a/b/c", TRUE); will gaurantee that the "a", and "a/b" folders exist, so that the "a/b/c" file can be created if it does not already exist.

Parameters:
[in] index 
[in] file_path 
[in] vivify If TRUE, then the path will be created if it does not already exist. If FALSE, NULL will be returned if the path does not exist. NULL may be returned for the empty path "", if the entire R/W data folder has never been accessed.
Returns:
An allocated string containg the desired path, assuming that the AlpBundle was valid. NULL otherwise. Free the result with g_free() when you are done with it.

int alp_prv_associated_data const char *  name  ) 
 

void handle_client_alp_bundle_rw_delete AlpConnection connection,
AlpMessage message,
gpointer  cbData
 

void handle_client_alp_bundle_rw_pathname AlpConnection connection,
AlpMessage message,
gpointer  cbData
 


Generated on Sat Dec 16 20:29:48 2006 for hiker-0.9 by  doxygen 1.4.4