Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check if path is a folder or a file with svnlook?

Tags:

svn

This is from svn docs(http://svnbook.red-bean.com/en/1.1/re44.html)

$ svnlook changed -r 39 /usr/local/svn/repos
A   trunk/vendors/deli/
A   trunk/vendors/deli/chips.txt
A   trunk/vendors/deli/sandwich.txt
A   trunk/vendors/deli/pickle.txt

I can check for trailing slash ("/") and if that exists, then it is a folder.

1) But how can I make sure that svn will always display folder path with the trailing slash?

2) Or, maybe there is more reliable way to check for path type(folder or file)?

like image 864
Chicago Avatar asked Oct 15 '25 14:10

Chicago


1 Answers

AFAIK there will always be a trailing slash on directory names as this signifies it is a directory. Otherwise it looks like a file without an extension.

like image 131
Tom Avatar answered Oct 18 '25 10:10

Tom



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!