Returns a specific $file object within the page's directory by filename. If no filename is given, the first file will be returned
<?php if($file = $page->file()): ?>
<a href="<?php echo $file->url() ?>">
<?php echo html($file->filename()) ?>
</a>
<?php endif ?>
<?php if($file = $page->file('myfile.pdf')): ?>
<a href="<?php echo $file->url() ?>">
<?php echo html($file->filename()) ?>
</a>
<?php endif ?>