Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Dig in to Directory Search  RSS feed

 
Pratik Surti
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have director structure like this: jsp/wiki/sys/common/p/TOTO/CRI

The system is distributed which randomly returns path like this: jsp/wiki/sys/common/

Now I have to rename CRI directory from the above given path jsp/wiki/sys/common/p/TOTO/CRI directory.

But the system returns short path jsp/wiki/sys/common/.

If it returns the parent directory then its not matter.

How can I reach to that directory which is located on same path, so that I can perform rename on it ?

Thanks & Regards,
Pratik Surti
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pratik Surti wrote:How can I reach to that directory which is located on same path, so that I can perform rename on it ?


I did not get your problem. What do you mean by "reach to that directory"?
Do you need a File object representing that path?
If yes, the File has a constructor taking the path that can be used here.

If you have any code that you have written then it is better if you post it here. That will explain things better.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!