ostadmin: Initial code

This commit is contained in:
Colin Walters committed 2012-05-07 20:43:03 -04:00
1 parent 1de0cc238b
commit 18b6f5fd0c
17 files changed
+892 -94

No files matched your search

+28
View File
@@ -77,6 +77,34 @@ ot_gfile_ensure_directory (GFile *dir,
return ret;
}
GFile *
ot_gfile_from_build_path (const char *first, ...)
{
va_list args;
const char *arg;
ot_lfree char *path = NULL;
ot_lptrarray GPtrArray *components = NULL;
va_start (args, first);
components = g_ptr_array_new ();
arg = first;
while (arg != NULL)
{
g_ptr_array_add (components, (char*)arg);
arg = va_arg (args, const char *);
}
va_end (args);
g_ptr_array_add (components, NULL);
path = g_build_filenamev ((char**)components->pdata);
return g_file_new_for_path (path);
}
GFile *
ot_gfile_get_child_strconcat (GFile *parent,
const char *first,