Re: [Vala] Resource API inconsistent





----- Original Message -----
From: Günther Wutz <info gunibert de>
Subject: Re: [Vala] Resource API inconsistent

Works now like a charm! The only bummer, there is no simple Method to
read a resource in as string - have to use a InputStream because
FileUtils doesn't work with resources-uri's.


If it's any easier you can cast Bytes to a string:

Bytes _template_resource = resources_lookup_data( "/templates/boot/fstab.mustache", ResourceLookupFlags.NONE 
);
string _template = (string)_template_resource.get_data();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]