コード例 #1
0
ファイル: gdfuse.py プロジェクト: john0312/GDriveFS
    def init(self, path):
        """Called on filesystem mount. Path is always /."""

        if gdrivefs.config.changes.MONITOR_CHANGES is True:
            _logger.info("Activating change-monitor.")
            get_change_manager().mount_init()
        else:
            _logger.warning("We were told not to monitor changes.")
コード例 #2
0
    def init(self, path):
        """Called on filesystem mount. Path is always /."""

        if gdrivefs.config.changes.MONITOR_CHANGES is True:
            _logger.info("Activating change-monitor.")
            get_change_manager().mount_init()
        else:
            _logger.warning("We were told not to monitor changes.")
コード例 #3
0
    def destroy(self, path):
        """Called on filesystem destruction. Path is always /."""

        _logger.info("Destroying filesystem resource.")

        if gdrivefs.config.changes.MONITOR_CHANGES is True:
            _logger.info("Stopping change-monitor.")
            get_change_manager().mount_destroy()

        _logger.info("Destroyed filesystem resource.")
コード例 #4
0
ファイル: drive_proxy.py プロジェクト: GoodGuysFree/GDriveFS
    def test_get_changes(self):

        from gdrivefs.change import get_change_manager
        get_change_manager().process_updates()

        import sys
        sys.exit()

        (largest_change_id, next_page_token, changes) = drive_proxy('list_changes')

        print("Largest Change ID: [%s]" % (largest_change_id))
        print("Next Page Token: [%s]" % (next_page_token))

        from pprint import pprint
        pprint(len(changes))
        print

        for change_id, (entry_id, was_deleted, entry) in changes.iteritems():
            print("%d> [%s] D:[%s] [%s]" % (change_id, entry_id, was_deleted, entry.title if entry else '<deleted>'))
コード例 #5
0
    def test_get_changes(self):

        from gdrivefs.change import get_change_manager
        get_change_manager().process_updates()

        import sys
        sys.exit()

        (largest_change_id, next_page_token, changes) = drive_proxy('list_changes')

        print("Largest Change ID: [%s]" % (largest_change_id))
        print("Next Page Token: [%s]" % (next_page_token))

        from pprint import pprint
        pprint(len(changes))
        print

        for change_id, (entry_id, was_deleted, entry) in changes.iteritems():
            print("%d> [%s] D:[%s] [%s]" % (change_id, entry_id, was_deleted, entry.title if entry else '<deleted>'))
コード例 #6
0
ファイル: gdfuse.py プロジェクト: HostSuki/GDriveFS
    def destroy(self, path):
        """Called on filesystem destruction. Path is always /."""

        get_change_manager().mount_destroy()
コード例 #7
0
ファイル: gdfuse.py プロジェクト: HostSuki/GDriveFS
    def init(self, path):
        """Called on filesystem mount. Path is always /."""

        get_change_manager().mount_init()
コード例 #8
0
ファイル: gdfuse.py プロジェクト: He1my/GDriveFS
    def destroy(self, path):
        """Called on filesystem destruction. Path is always /."""

        get_change_manager().mount_destroy()
コード例 #9
0
ファイル: gdfuse.py プロジェクト: He1my/GDriveFS
    def init(self, path):
        """Called on filesystem mount. Path is always /."""

        get_change_manager().mount_init()