Re: [Vala] Rv: C to Vala

2012-09-21 Thread Gilzad Hamuni
If I understand correctly, that approach requires an intermediate bytecode either from Java or from .NET to finally create sourcecode. Alas, in the OP's case the best we can get would be native machine code (being different for x64, i386, arm, etc) so the parser wouldn't be able to stick to

Re: [Vala] Rv: C to Vala

2012-09-21 Thread Mario Daniel Ruiz Saavedra
Doing some research, i found something relevant: http://razum.si/automagical/ It's not the same, but uses the same principle i've thought, declaring some rules about when finding a class declaration, translate; etc. Shouldn't be that hard, for a good declarative programmer (i'm not one, not

[Vala] deleting folders

2012-09-21 Thread D.H. Bahr
Hello everyone! GLib.File provides a 'delete' method to delete files and empty folders. I need to delete a non empty folder so I thought of a recursive method like this: bool remove_directory (string path) { bool flag = false; var directory = File.new_for_path (path); var enumerator =

Re: [Vala] deleting folders

2012-09-21 Thread Victor Eduardo
You obviously can't, but you can do the following: string file_name = file_info.get_name (); var file = directory.get_child (file_name); And after that, you can call file.delete(). Regards, Victor. On vie, sep 21, 2012 at 1:07 , D.H. Bahr db...@uci.cu wrote: Hello everyone! GLib.File

Re: [Vala] deleting folders

2012-09-21 Thread Victor Eduardo
My last message was incomplete. I meant that you can't get a GLib.File directly from a GLib.FileInfo object, but you can do it using the way I suggested. Hope this helps. On vie, sep 21, 2012 at 1:07 , D.H. Bahr db...@uci.cu wrote: Hello everyone! GLib.File provides a 'delete' method to

Re: [Vala] deleting folders

2012-09-21 Thread Thomas Jollans
On 09/21/2012 09:07 PM, D.H. Bahr wrote: Hello everyone! GLib.File provides a 'delete' method to delete files and empty folders. I need to delete a non empty folder so I thought of a recursive method like this: bool remove_directory (string path) { bool flag = false; var directory