Renames the file and all the meta text files.
$file = $page->file('file-with-old-name.pdf');
try {
$file->rename('new-name.pdf');
echo 'The file has been renamed';
} catch(Exception $e) {
echo 'The file could not be renamed';
// optional reason: echo $e->getMessage();
}