get_parent_dir | R Documentation |
Use this function to retrieve the parent directory from a string representing the full path of a file or a directory.
get_parent_dir(pathStr)
pathStr |
string. The name of the directory, can be a full path filename. |
a string representing the parent directory. When a non-file path is used as input (or something along those lines :) then it returns the root ("/") directory.
get_parent_dir("/home/john")
get_parent_dir("/home/john/a.txt")
get_parent_dir("/home")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.