When using Unix or MSDOS syntax, the return value conforms to the behav- ior of the Unix shell command dirname(1). This is usually the same as the behavior of fileparse(), but differs in some cases. For example, for the input file specification lib/, fileparse() consid- ers the directory name to be lib/, while dirname() considers the directory name to be .). #### $ dirname foo/bar foo $ dirname foo/bar/ foo $ dirname foo/bar/. foo/bar