Re: How would one set the current directory?
- From: Charles Hixson <charleshixsn earthlink net>
- To: gtkmm-list gnome org
- Subject: Re: How would one set the current directory?
- Date: Fri, 05 Nov 2010 19:12:00 -0700
On 11/03/2010 08:59 PM, Charles Hixson wrote:
I've looked, but outside I don't see any routine that's obviously
intended for that purpose. I suppose I could just use chdir(), but
that seems like the wrong approach. (Even if it works now, it's
likely not to work some time in the future.)
OK. This is what I ended up with:
#include <glib.h>
#include <glibmm.h>
#include <iostream>
#include <glib/gstdio.h>
..
if (g_chdir(dirPath->str) != 0)
{ std::cout << "Couldn't change current directory to:\n%s\n" <<
...
That may be an extra include, but this worked, and I didn't feel like
experimenting more.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]