Skip to content Skip to footer navigation
🏰 Statamic Summit 2027 Feb 16–19 Talks, workshops, and three nights in a German castle. Get Tickets

Pathinfo Modifier

Get information about a file path.

path: '/local/file/example.pdf'
{{ path | pathinfo }}
{{ path | pathinfo('extension') }}
{{ Statamic::modify($path)->pathinfo() }}
{{ Statamic::modify($path)->pathinfo('extension') }}
[
'dirname' => '/local/file',
'basename' => 'example.pdf',
'filename' => 'example',
'extension' => 'pdf',
]
pdf