def _compute_dir_contents(n, path, show_hidden=False):
 url_append = ''
 if show_hidden:
  url_append = '?hidden=1'
 if (path != '/'):
  (yield ('..', ('../' + url_append), ''))
 for sub in n:
  display = sub.name
  link = urllib.quote(sub.name)
  if stat.S_ISDIR(sub.try_resolve().mode):
   link += '/'
  if ((not show_hidden) and (len(display) > 1) and display.startswith('.')):
   continue
  size = None
  if stat.S_ISDIR(sub.mode):
   display += '/'
  elif stat.S_ISLNK(sub.mode):
   display += '@'
  else:
   size = sub.size()
   size = ((opt.human_readable and format_filesize(size)) or size)
  (yield (display, (link + url_append), size))

def _compute_dir_contents ( n , path , show_hidden = False ) : url_append = '' if show_hidden : url_append = '?hidden=1' if ( path != '/' ) : ( yield ( '..' , ( '../' + url_append ) , '' ) ) for sub in n : display = sub . name link = urllib . quote ( sub . name ) if stat . S_ISDIR ( sub . try_resolve ( ) . mode ) : link += '/' if ( ( not show_hidden ) and ( len ( display ) > 1 ) and display . startswith ( '.' ) ) : continue size = None if stat . S_ISDIR ( sub . mode ) : display += '/' elif stat . S_ISLNK ( sub . mode ) : display += '@' else : size = sub . size ( ) size = ( ( opt . human_readable and format_filesize ( size ) ) or size ) ( yield ( display , ( link + url_append ) , size ) )
given a vfs node .