BOOL MYRTLEXP IsSameFile( const MyString& f1,const MyString& f2 ) { MyString s,s1; //Both path exist if ( f1.Chr(SLASH_CHAR) != -1 && f2.Chr(SLASH_CHAR) != -1 && !CMP_FILE(GetFPath(f1).Text(),GetFPath(f2).Text()) ) return FALSE; return CMP_FILE( GetFName(f1).Text(),GetFName(f2).Text() ); }
MyString MYRTLEXP MakeFullPathName( const MyString& fname, const MyString& base ) { MyString oldP,s; if ( fname.Chr(SLASH_CHAR) == -1 ) { s.Set( base ); s.Add( SLASH_CHAR ); s.Add( fname ); return s; } oldP = GetCurDir(); //Go base path SetCurDir( base.Text() ); //Go fname path in case it relative SetCurDir( FPath(fname.Text()) ); //Get result path + name s.Set( GetCurDir() ); s.Add( FName(fname.Text()) ); SetCurDir( oldP.Text() ); return s; }