add FileUtils class

Bug #1030946 reported by Mario Guerriero
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Granite
Won't Fix
Wishlist
Unassigned

Bug Description

Working on Scratch I am noticing that GLib is not so good with files handling (open, load, save, etc.). It doesn't support file reading from uris and sometimes it does undesired things on files such as permission resetting. A lot of apps need a working file handling system (scratch, footnote, noise (?), midori (?), maya and many others) but it couldn't be easy to be done sometimes and could require a lot of functions which are not well documented. I am working on a set of functions based on GIO to have the best file handling with Vala. My functions can be included in a common class to make things easily and to have a collective working file handling class to avoid undesired bugs in some apps.

Revision history for this message
Mario Guerriero (mefrio-g) wrote :

you can see a prototype of this implementation here: http://bazaar.launchpad.net/~elementary-apps/scratch/scratch/view/head:/src/Services/FileHandler.vala I've called the class FileHandler to avoid problem with the GLib one

Revision history for this message
Victor Martinez (victored) wrote :

That's a nice idea Mario. The FileHandler class looks very nice; it's only lacking GCancellable support, but that's a minor easily-fixable issue.

Here are a few from Noise: http://bazaar.launchpad.net/~victored/noise/core-refactor/view/head:/core/Utils/FileUtils.vala

tags: added: file-handling
Changed in granite:
status: New → Confirmed
status: Confirmed → In Progress
importance: Undecided → Wishlist
assignee: nobody → Mario Guerriero (mefrio-g)
Revision history for this message
Danielle Foré (danrabbit) wrote :

I'm going to mark this as "Won't Fix" for granite. According to Corentin it sounds like this isn't a problem anymore. And if there were still problems we should probably try to implement these fixes upstream in the relevant libraries.

Changed in granite:
assignee: Mario Guerriero (mefrio-g) → nobody
status: In Progress → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.