49 file = tempFile.
Path();
50 BOOST_CHECK( wxFileName::DirExists(
directory ) );
51 BOOST_CHECK( wxFileName::FileExists( file ) );
53 const wxString nested =
directory + wxS(
"/nested/child" );
54 BOOST_REQUIRE( wxFileName::Mkdir( nested, wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL ) );
55 wxFFile content( wxFileName( nested, wxS(
"content" ) ).GetFullPath(), wxS(
"w" ) );
59 BOOST_CHECK( !wxFileName::DirExists(
directory ) );
60 BOOST_CHECK( !wxFileName::FileExists( file ) );
67 const mode_t previousMask = umask( 0 );
68 wxON_BLOCK_EXIT1( umask, previousMask );
75 BOOST_CHECK( first.
Path() != second.
Path() );
76 BOOST_CHECK( wxFileName::DirExists( first.
Path() ) );
77 BOOST_CHECK( wxFileName::DirExists( second.
Path() ) );
80 for(
const wxString&
path : { first.
Path(), second.
Path() } )
83 BOOST_REQUIRE_EQUAL( stat(
path.fn_str(), &status ), 0 );
121 const wxString sentinel = wxFileName( outside.
Path(), wxS(
"sentinel" ) ).GetFullPath();
124 wxFFile content( sentinel, wxS(
"w" ) );
126 BOOST_REQUIRE( content.Write( wxS(
"keep this directory" ) ) );
129 wxString scratchPath;
134 scratchPath = scratch.
Path();
135 const wxString
link = wxFileName( scratchPath, wxS(
"outside" ) ).GetFullPath();
136 BOOST_REQUIRE_EQUAL( symlink( outside.
Path().fn_str(),
link.fn_str() ), 0 );
139 BOOST_CHECK( !wxFileName::DirExists( scratchPath ) );
140 BOOST_CHECK( wxFileName::DirExists( outside.
Path() ) );
141 wxFFile content( sentinel, wxS(
"r" ) );
BOOST_CHECK_EQUAL(result, "25.4")