Re: glibmm g_mkdir_with_parents() function/method
- From: José Alburquerque <jaalburquerque cox net>
- To: Armin Burgmeier <armin arbur net>
- Cc: gtkmm-list gnome org
- Subject: Re: glibmm g_mkdir_with_parents() function/method
- Date: Wed, 05 Sep 2007 13:35:24 -0400
Armin Burgmeier wrote:
If it is not wrapped in glibmm, you can always call the C function
(namely g_mkdir_with_parents()) from within your C++ code.
Also, in Gobby, we have a function that does probably the same as
g_mkdir_with_parents (which we did not use because gobby only requires
glib 2.6):
void create_path_to(const std::string& to)
{
// Directory exists, nothing to do
if(Glib::file_test(to, Glib::FILE_TEST_IS_DIR) )
return;
// Find path to the directory to create
std::string path_to = Glib::path_get_dirname(to);
// Create this path, if it doesn't exists
create_path_to(path_to);
// Create new directory
create_directory(to.c_str() );
}
Armin
This really helps. Thanks. I really just wanted to make sure I wasn't
missing something and you've cleared this up quite well. Thanks again.
-Jose
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]