Esempio n. 1
0
	def __init__(self, parent, path, selection=None):
		Provider.__init__(self, parent, path, selection)

		self._cache = {}
		self._file_list = []
		self._zip_file = None

		# get icon name
		icon_manager = self._parent._parent.icon_manager
		self._protocol_icon = icon_manager.get_icon_for_file(path)
Esempio n. 2
0
    def __init__(self, parent, path, selection=None):
        Provider.__init__(self, parent, path, selection)

        self._cache = {}
        self._file_list = []
        self._zip_file = None

        # get icon name
        icon_manager = self._parent._parent.icon_manager
        self._protocol_icon = icon_manager.get_icon_for_file(path)
Esempio n. 3
0
    def get_monitor(self, path):
        """Get file system monitor for specified path"""
        try:
            result = GioMonitor(self, path)
        except:
            result = Provider.get_monitor(self, path)

        return result
Esempio n. 4
0
	def get_monitor(self, path):
		"""Get file system monitor for specified path"""
		try:
			result = GioMonitor(self, path)
		except:
			result = Provider.get_monitor(self, path)

		return result
Esempio n. 5
0
    def get_monitor(self, path):
        """Get file system monitor for specified path"""
        try:
            result = LocalMonitor(self, path)

        except MonitorError as error:
            result = Provider.get_monitor(self, path)

        return result
Esempio n. 6
0
	def get_monitor(self, path):
		"""Get file system monitor for specified path"""
		try:
			result = LocalMonitor(self, path)

		except MonitorError as error:
			result = Provider.get_monitor(self, path)

		return result
Esempio n. 7
0
	def real_path(self, path, relative_to=None):
		"""Get real path based on specified parameters."""
		if path.startswith('file://'):
			path = path[7:]

		if relative_to is not None and relative_to.startswith('file://'):
			relative_to = relative_to[7:]

		return Provider.real_path(self, path, relative_to)
Esempio n. 8
0
 def release_archive_handle(self):
     """Release archive handle when it's no longer needed."""
     self._zip_file.close()
     Provider.release_archive_handle(self)
Esempio n. 9
0
 def set_archive_handle(self, handle):
     """Set archive file handle."""
     Provider.set_archive_handle(self, handle)
     self._zip_file = zipfile.ZipFile(self._handle, 'a')
Esempio n. 10
0
	def release_archive_handle(self):
		"""Release archive handle when it's no longer needed."""
		self._zip_file.close()
		Provider.release_archive_handle(self)
Esempio n. 11
0
	def set_archive_handle(self, handle):
		"""Set archive file handle."""
		Provider.set_archive_handle(self, handle)
		self._zip_file = zipfile.ZipFile(self._handle, 'a')