# Path: sunflower/plugin_base/provider.py
# class Mode:
# 	READ = 0
# 	WRITE = 1
# 	APPEND = 2
# 	READ_APPEND = 3


from gi.repository import Gio, GLib, GObject
from sunflower.plugin_base.provider import Mode
from __future__ import absolute_import


# GFile.read_bytes() has upper limit for size of G_MAXSSIZE (9223372036854775807) which is unsensibly large
MAX_READ_FILE_SIZE = 4*1024*1024*1024

class File:
	"""This is a wrapper class that provides file-like object but
	uses Gio.File for actual operations."""

	def __init__(self, path, mode):
		if mode == Mode.READ:
			self._resource = Gio.File.new_for_commandline_arg(path).read()


# Path: sunflower/plugin_base/provider.py
# class Mode:
# 	READ = 0
# 	WRITE = 1
# 	APPEND = 2
# 	READ_APPEND = 3


# Path: sunflower/plugins/file_list/gio_wrapper.py
from gi.repository import Gio, GLib, GObject
from sunflower.plugin_base.provider import Mode

from __future__ import absolute_import


# GFile.read_bytes() has upper limit for size of G_MAXSSIZE (9223372036854775807) which is unsensibly large
MAX_READ_FILE_SIZE = 4*1024*1024*1024

class File:
	"""This is a wrapper class that provides file-like object but
	uses Gio.File for actual operations."""

	def __init__(self, path, mode):
		if mode == Mode.READ:
			self._resource = Gio.File.new_for_commandline_arg(path).read()


		elif mode == Mode.WRITE: