This small snippet shows how to rename a file in Vala.
var file = File.new_from_path("hello.txt"); var renamed = file.set_display_name ("hello_world.html");
Updated on: 27 Dec 2024