Code example for FileObserver

Methods: startWatching

0
				} 
			}; 
		} 
 
		observers.add(observer);
		mFileObserver.startWatching();
	} 
 
	public static void deleteAll(Context context) {
		final File dir = getThumbnailDir(context);
		for (final File thumbnail : dir.listFiles()) {
			thumbnail.delete();
		} 
		dir.delete();
	} 
 
	public static void deleteThumbnails(Context context, long bookId) {
		final File smallThumbnail = getThumbnail(context, bookId, true);
		if (smallThumbnail.exists()) {
			smallThumbnail.delete();
		}