"Brandon Kohn" <blk@sciencemc.org> writes: > This is a multi-part message in MIME format. > > ------=_NextPart_000_0007_01C13B85.17FFE520 > Content-Type: text/plain; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > The directory creation schemes are very confusing to me. I'm trying to = > create a subdirectory from the root directory (root as in top-level) and = > then another subdirectory underneath the former. The problem is that I = > always seem to be creating directories immediately under the root = > directory. Could someone please tell me how to do this correctly? > > TFile* f =3D new TFile("c:\\compression1.root","UPDATE","TestFile"); > > gDirectory->pwd(); > f->mkdir("somefiles");=20 > f->cd("somefiles"); > f->mkdir("morefiles"); > gDirectory->pwd(); > f->cd("morefiles"); > gDirectory->pwd(); > > Here's the output: > > c:\compression1.root:/ > c:\compression1.root:/somefiles > c:\compression1.root:/morefiles > Hi, you can create a subdir of somefiles by calling somefiles->mkdir("morefiles"); It doesn't matter which directory your current dir is. By calling f->mkdir("morefiles"); a new subdir of f is created as you observe. Jiri
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:59 MET