String getPathName ( boolean url ) { if ( pathName == null || pathName . isEmpty ( ) ) { VirtualFile [ ] path = getParentFiles ( ) ; final StringBuilder builder = new StringBuilder ( path . length * 30 + 50 ) ; for ( int i = path . length - 1 ; i > - 1 ; i -- ) { final VirtualFile parent = path [ i ] . parent ; if ( parent == null ) { builder . append ( path [ i ] . name ) ; } else { if ( parent . parent != null ) { builder . append ( ' ' ) ; } builder . append ( path [ i ] . name ) ; } } pathName = builder . toString ( ) ; } // Perhaps this should be cached to avoid the fs stat call? return ( url && isDirectory ( ) ) ? pathName . concat ( "/" ) : pathName ; }
Get the absolute VFS full path name . If this is a URL then directory entries will have a trailing slash .