# Path: sunflower/plugin_base/monitor.py
# class MonitorSignals:
# 	CHANGED = 0  # file changed
# 	CHANGES_DONE = 1  # a hint that this was probably the last change in a set
# 	DELETED = 2  # file was deleted
# 	CREATED = 3  # file was created
# 	ATTRIBUTE_CHANGED = 4  # attribute was changed
# 	PRE_UNMOUNT = 5  # location will soon be unmounted
# 	UNMOUNTED = 6  # location was unmounted
# 	MOVED = 7  # file was moved
# 	EMBLEM_CHANGED = 8  # list of emblems has changed
# 	DIRECTORY_SIZE_CHANGED = 9  # calculated directory size has changed
# 	DIRECTORY_SIZE_STOPPED = 10  # directory size calculation has finished


import os
from threading import Thread, Event, Lock
from sunflower.plugin_base.monitor import MonitorSignals
				monitor_queue.put((MonitorSignals.DIRECTORY_SIZE_CHANGED, path, None), False)
				stop_event.set()
				continue

			# get list of items in specified directory
			try:
				item_list = provider.list_dir(scan_path, relative_to=path)

			except OSError:
				# silently ignore errors
				continue

			else:
				relative_path = os.path.join(path, scan_path)

			for item in item_list:
				if provider.is_dir(item, relative_to=relative_path) \
				and not provider.is_link(item, relative_to=relative_path):
					# queue up new directory to check
					scan_list.append(os.path.join(scan_path, item))

				else:
					# update total statistics
					stat = provider.get_stat(item, relative_to=relative_path, extended=False, follow=False)
					total_count += 1
					total_size += stat.size

				# update monitor only once in a while
				if total_count % 50 == 0:
					self.__update_totals(parent_id, path, total_count, total_size)

# Path: sunflower/plugin_base/monitor.py
# class MonitorSignals:
# 	CHANGED = 0  # file changed
# 	CHANGES_DONE = 1  # a hint that this was probably the last change in a set
# 	DELETED = 2  # file was deleted
# 	CREATED = 3  # file was created
# 	ATTRIBUTE_CHANGED = 4  # attribute was changed
# 	PRE_UNMOUNT = 5  # location will soon be unmounted
# 	UNMOUNTED = 6  # location was unmounted
# 	MOVED = 7  # file was moved
# 	EMBLEM_CHANGED = 8  # list of emblems has changed
# 	DIRECTORY_SIZE_CHANGED = 9  # calculated directory size has changed
# 	DIRECTORY_SIZE_STOPPED = 10  # directory size calculation has finished


# Path: sunflower/tools/disk_usage.py
import os
from threading import Thread, Event, Lock
from sunflower.plugin_base.monitor import MonitorSignals

				monitor_queue.put((MonitorSignals.DIRECTORY_SIZE_CHANGED, path, None), False)
				stop_event.set()
				continue

			# get list of items in specified directory
			try:
				item_list = provider.list_dir(scan_path, relative_to=path)

			except OSError:
				# silently ignore errors
				continue

			else:
				relative_path = os.path.join(path, scan_path)

			for item in item_list:
				if provider.is_dir(item, relative_to=relative_path) \
				and not provider.is_link(item, relative_to=relative_path):
					# queue up new directory to check
					scan_list.append(os.path.join(scan_path, item))

				else:
					# update total statistics
					stat = provider.get_stat(item, relative_to=relative_path, extended=False, follow=False)
					total_count += 1
					total_size += stat.size

				# update monitor only once in a while
				if total_count % 50 == 0:
					self.__update_totals(parent_id, path, total_count, total_size)

					monitor_queue.put((MonitorSignals.DIRECTORY_SIZE_CHANGED, path, None), False)