Changeset 193


Ignore:
Timestamp:
May 31, 2006, 10:23:37 PM (18 years ago)
Author:
garonne
Message:

add the realpath function which resolved symbolic links in a path

Location:
CMT/HEAD/source
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/source/cmt_system.cxx

    r179 r193  
    246246
    247247  return (true);
     248}
     249
     250//--------------------------------------------------
     251void CmtSystem::realpath (const cmt_string& path, cmt_string& result)
     252{
     253  cmt_string here     = CmtSystem::pwd ();
     254  CmtSystem::cd (path);
     255  result              = CmtSystem::pwd ();
     256  CmtSystem::cd (here);
    248257}
    249258
  • CMT/HEAD/source/cmt_system.h

    r179 r193  
    3737                        const cmt_string& suffix,
    3838                        cmt_string& result);
     39
     40  // Resolve symbolic links in a path.
     41  static void realpath (const cmt_string& path, cmt_string& result);
    3942
    4043  static void dirname (const cmt_string& file_name, cmt_string& result);
Note: See TracChangeset for help on using the changeset viewer.