How to create a new directory?
- From: Gerardo Ballabio <gerardo ballabio gmail com>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: How to create a new directory?
- Date: Sun, 15 Apr 2012 20:28:09 +0200
Hi all,
can you please tell me what is the recommended and most portable way
to create a new directory in a gtkmm program?
Browsing the glibmm documentation I didn't found any interface for
creating a new directory. If I read correctly, class Glib::Dir
provides a read-only interface that only allows to read existing
directories.
I want specifically to create a directory where to store user-specific
data for a game (configuration settings, scores etc.). Functions like
Glib::get_user_config_dir and Glib::get_user_data_dir return suggested
paths where to store application data (on my Debian system they are
$HOME/.config and $HOME/.local/share respectively), but most
applications don't write their files directly there: rather, they
create their own subdirectories. I want to do the same.
I might use the Unix mkdir system call, but then my program wouldn't
be portable to non-Unix systems. Is there a more general solution?
Thanks in advance
Gerardo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]