示例#1
0
 def mount(self,
           fstype=None,
           options=None,
           auth_no_user_interaction=None):
     """Mount filesystem."""
     options = list(filter(None, (options or '').split(','))) + filter_opt({
         'auth_no_user_interaction': auth_no_user_interaction
     })
     return self.method.FilesystemMount(fstype or self.id_type, options)
示例#2
0
    def get_all_handleable(self):
        """
        Enumerate all handleable devices currently known to udisks.

        :returns: handleable devices
        :rtype: iterable

        NOTE: returns only devices that are still valid. This protects from
        race conditions inside udiskie.
        """
        return filter(self.is_handleable, self.udisks)
示例#3
0
    def get_all_handleable(self):
        """
        Enumerate all handleable devices currently known to udisks.

        :returns: handleable devices
        :rtype: iterable

        NOTE: returns only devices that are still valid. This protects from
        race conditions inside udiskie.
        """
        return filter(self.is_handleable, self.udisks)
示例#4
0
 def __iter__(self):
     """Iterate over all devices."""
     return filter(None, (self[path] for path in self.paths()
                          if object_kind(path) in ('device', 'drive')))
示例#5
0
 def __iter__(self):
     """Iterate over all devices."""
     return filter(None, map(self.get, self.paths()))
示例#6
0
 def __iter__(self):
     """Iterate over all devices."""
     return filter(None, map(self.get, self.paths()))
示例#7
0
 def __iter__(self):
     """Iterate over all devices."""
     return filter(None, (self[path] for path in self.paths()
                          if object_kind(path) in ('device', 'drive')))