Added wxFileName::Exists().

This function checks for existence of anything with the given name, not
necessarily just a file or a directory.

Extend the unit test to verify that it returns true for /dev/null on Unix
systems.

Closes #953.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-02-15 15:39:46 +00:00
parent 901504c383
commit 996d3fe3f8
5 changed files with 51 additions and 4 deletions

View File

@@ -732,6 +732,12 @@ bool wxFileName::DirExists( const wxString &dirPath )
return wxFileSystemObjectExists(dirPath, wxFileSystemObject_Dir);
}
/* static */
bool wxFileName::Exists(const wxString& path)
{
return wxFileSystemObjectExists(path, wxFileSystemObject_Any);
}
// ----------------------------------------------------------------------------
// CWD and HOME stuff
// ----------------------------------------------------------------------------