]> git.saurik.com Git - wxWidgets.git/commit
Refactor wxFileName existence checking code.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 15 Feb 2012 15:39:41 +0000 (15:39 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 15 Feb 2012 15:39:41 +0000 (15:39 +0000)
commit901504c38303a144615a7f88b328694c6662bbf7
treec8f66c9ae19995e8959c233bbd97c796b0bcf3de
parent06bfd04527513dc8a1f455d4c0c92478d52a7366
Refactor wxFileName existence checking code.

Merge FileExists() and DirExists() together in a single
wxFileSystemObjectExists() helper in preparation for adding a function
checking for the existence of any kind of file system object.

There should be no changes for MSW/Unix but OS/2 file detection was changed
slightly to always use DosQueryPathInfo() instead of using it only for the
directories and stat() for files. Not sure if this is the right thing to do
there but it seems like the code should work.

Also add a simple unit test for these functions.

See #953.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/common/filename.cpp
tests/filename/filenametest.cpp