[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Cross-platform file munging



What's the best (ie most portable) way to construct path names on an arbitrary
system?  I've looked at File::Path, et al, but none seem to have a decent set of
features, though I dimly recall a discussion a while back suggesting the use of
some similar module package.

What is needed:
 1) Given a file and a path, create a fully specified filename (combine them)
    This obviously will probably involve adding the system specific directory
separator; colon on the mac, backslash on Win, forward slash on unix.
 2) Given a path, go up one directory.
    ie path:: for Mac, path\.. for Win/Dos path/.. for Unix...
    this could probably also be done by stripping the last part of the path off
(to the last directory separator).
 3) Given a fully specified pathname, separate filename and path.
    I've seen modules that do this part.

Any suggestions?
  --Scott