Question on TSystemDirectory


thanks for supporting the community, I have a question which I need to understand. When I run bertrand’s code
as unnamed macro in the following page

I get /home/vaibhav and /home/vaibhav/rms_folder/rms_compute_S6A_50_1024Hz_attribute_masked/output, before and after executing the code, which means my working directory for root prompt changes.

I believe there will be many ways to come back to /home/vaibhav on the same root promt, kindly suggest some of them.


TString cwd(gSystem->pwd()); // "save" the name of the "current working directory" // ... do whatever you want ... gSystem->cd(cwd.Data()); // "go back" to the old ("saved") subdirectory Note that this is the same solution as shown here: [url]TSystemDirectory::GetListOfFile null pointer
See also:

Thank You for explaining. Somehow the discussion topics you shared are not visible in google search.