Hi Charles, TDirectory::mkdir creates the new directory into the current directory, not inside the "this" directory. I have added a few more comments in the documentation. Thanks for pointing the inaccuracy in the doc. Rene Brun Charles Leggett wrote: > > TDirectory::mkdir() is not behaving as I would expect it to, and I'm > not sure if this is a bug or intentional. > > Let's say I want to create a structure like: > top/sub1/sub2 > > I would expect to be able to do: > TDirectory *sb1 = top->mkdir("sub1"); > TDirectory *sb2 = sb1->mkdir("sub2"); > > Instead, this creates two subdirectories of top: > top/sub1 > top/sub2 > > To make the desired structure, I have to do: > TDirectory *sb1 = top->mkdir("sub1"); > sb1->cd(); > TDirectory *sb2 = top->mkdir("sub2"); > > Is this really intentional? It seems counter-intuitive to me. > > cheers... Charles. > > PS: this is with version 2.25/01 > > -- > +---------------------------------------------------------------------+ > | Charles Leggett | <CGLeggett@lbl.gov> | > | Lawrence Berkeley National Lab | HCG / NERSC : Atlas / D0 | > | 1 Cyclotron Road, MS 50B-3238 | | > | Berkeley, CA 94720 | Eagles may soar, but weasels don't | > | (510) 495-2930 room: 50B-3201 | get sucked into jet engines. | > +------------------- http://annwm.lbl.gov/~leggett -------------------+
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:32 MET