Next: file names system, Previous: file names parts, Up: file names [Contents][Index]
If pathname is a subdirectory or file under basedir: print to stdout the subpathname portion. Example:
mbfl_file_subpathname /a/b/c /a -> ./b/c
Both pathname and basedir must be full (normalised) pathnames for this function to work. If pathname is recognised as subpathname of basedir: the return code is zero; else the return code is one.
The function variant _var
stores the result in the variable _RV, rather than print it;
Result variables.
mbfl_file_subpathname /a /a -| ./ mbfl_file_subpathname /a/b/c /a/ -| ./b/c mbfl_file_subpathname /a/b/c /a -| ./b/c mbfl_file_subpathname /a/b/c /d error→ no match local _RV mbfl_file_subpathname_var _RV /a/b/c /a "$_RV" ⇒ ./b/c
Return true if the first character in pathname is a slash (/
); else return false.
Return true if pathname is a directory according to mbfl_file_is_directory()
and an
absolute pathname according to mbfl_file_is_absolute()
.
Return true if pathname is a file according to mbfl_file_is_file()
and an absolute
pathname according to mbfl_file_is_absolute()
.
Return true if the first character in pathname is not a slash (/
); else return
false.
Return true if pathname is a directory according to mbfl_file_is_directory()
and an
relative pathname according to mbfl_file_is_relative()
.
Return true if pathname is a file according to mbfl_file_is_file()
and an relative
pathname according to mbfl_file_is_relative()
.
Next: file names system, Previous: file names parts, Up: file names [Contents][Index]