Version: v0.8.1 - Beta.  We welcome contributors & feedback.

File.toUrl

$file.toUrl() -> $urlTypeString

Description

Get a URL TypeString from a file in the public or pages directory.

$imageUrl = file'public:/images/logo.png'.toUrl()
//= url'/images/logo.png'

$pageUrl = file'app:/code/pages/profile/edit.tht'.toUrl()
//= url'/profile/edit'

See Also