Arley Consuegra Rosello wrote:
>  
> Hello I'm beging with Vala and want to know how to run aplications of the 
> system with Vala.
> Example:
> In c++ I could use system ("some thing ") or exec , etc.
>  
> I want too, read a file using ssh.
> Tthere are some library to do that?
>  
> pd:I don't write very well in English sorry.

Hi,

int main () {

        string standard_error;
        string standard_output;
        int exit_status;

        try {
                Process.spawn_command_line_sync ("/bin/ls",
                                                 out standard_output,
                                                 out standard_error,
                                                 out exit_status);
                stdout.printf ("%s", standard_output);

        } catch (SpawnError e) {
                stdout.printf ("Error: %s\n", e.message);
        }

        return 0;
}

Best Regards,

Frederik
_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to