<%# Returns the extension (the portion of file name in path after the period) %> <% extname = File.extname(path) %> <%# Returns components of the filename, + last component of the filename sans the extension %> <% fullPath = File.dirname(path) + '/' + File.basename(path, extname)%> <%# Returns components of the filename, + last component of the filename w/the extension %> <% fullPathExtname = File.dirname(path) + '/' + File.basename(path)%> <%# prepends path to fullPathExtname %> <% mtime_path = 'views/' + fullPathExtname %> <%# wrapps fullPathExtname for display in the view %> <% file_path = '< File path: ' + fullPathExtname + ' ' + '>' %> <%# ---------------------------------------------- %>
<%= partial fullPath %>

view

<%= path %>

Last modified: <%= File.mtime(mtime_path) %>