Re: [ROOT] TGFileInfo question

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Sat Jul 21 2001 - 16:27:35 MEST


Hi Catalin,

   you can use gSystem->BaseName("/home/catalin/file.txt") which
will return "file.txt". gSystem->DirName() can be used to get
the path.

Cheers, Fons.


On Fri, Jul 20, 2001 at 09:32:05PM -0700, Catalin Ristea wrote:
>  Hi ROOTers,
> 
>  I have a small problem, and I would appreciate any
> help. When using TGFileInfo object, the member data
> xx.fFilename is storing the entire path along with the
> file name, that is "/.../.../.../myfile.xxx" . I am
> wondering if there is some ROOT trick in order to get
> only the file name, without have to do some string
> operations (char by char). Thank you!
> 
> My best wishes,
> Catalin Ristea.
>  
> 
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7677910



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:52 MET