#NEWLINE# def cmd_lsinfo( self , conn , path = '/' ) : #NEWLINE# #INDENT# 'Sends info on all the items in the path.' #NEWLINE# node = self . _resolve_path ( path ) #NEWLINE# if isinstance ( node , int ) : #NEWLINE# #INDENT# raise BPDError ( ERROR_ARG , 'this is not a directory' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# for ( name , itemid ) in iter ( sorted ( node . files . items ( ) ) ) : #NEWLINE# #INDENT# item = self . lib . get_item ( itemid ) #NEWLINE# ( yield self . _item_info ( item ) ) #NEWLINE# #UNINDENT# for ( name , _ ) in iter ( sorted ( node . dirs . iteritems ( ) ) ) : #NEWLINE# #INDENT# dirpath = self . _path_join ( path , name ) #NEWLINE# if dirpath . startswith ( '/' ) : #NEWLINE# #INDENT# dirpath = dirpath [ 1 : ] #NEWLINE# #UNINDENT# ( yield ( 'directory: %s' % dirpath ) )