Logo Search packages:      
Sourcecode: sabayon version File versions  Download package

def lib::storage::ProfileStorage::foreach (   self,
  callback,
  user_data = None,
  source = None 
)

Iterate over the contents of the profile:

@callback: an function or method of which takes 
at least two arguments - @source and @path. If @callback
is a method, the object which the method is associated
will be the first parameter. If @user_data is passed,
then it will be the final parameter to the callback.
@user_data: an (optional) parameter to pass to @callback.
@source: an (optional) identifier of the source whose
files should be listed.

Definition at line 515 of file storage.py.

00515                                                                  :
        """Iterate over the contents of the profile:

        @callback: an function or method of which takes 
        at least two arguments - @source and @path. If @callback
        is a method, the object which the method is associated
        will be the first parameter. If @user_data is passed,
        then it will be the final parameter to the callback.
        @user_data: an (optional) parameter to pass to @callback.
        @source: an (optional) identifier of the source whose
        files should be listed.
        """
        self.__read_metadata ()

        for node in self.metadata.xpathEval ("/metadata/files/file"):
            self.__foreach_node (node, callback, user_data, source)
            
        for node in self.metadata.xpathEval ("/metadata/directories/directory"):
            self.__foreach_node (node, callback, user_data, source)

    def save (self):


Generated by  Doxygen 1.6.0   Back to index