Logo Search packages:      
Sourcecode: ardour version File versions  Download package

bool Glib::file_test ( const std::string &  filename,
FileTest  test 

Returns true if any of the tests in the bitfield test are true.

For example, (Glib::FILE_TEST_EXISTS | Glib::FILE_TEST_IS_DIR) will return true if the file exists; the check whether it's a directory doesn't matter since the existence test is true. With the current set of available tests, there's no point passing in more than one test at a time.

Apart from Glib::FILE_TEST_IS_SYMLINK all tests follow symbolic links, so for a symbolic link to a regular file file_test() will return true for both Glib::FILE_TEST_IS_SYMLINK and Glib::FILE_TEST_IS_REGULAR.

For a dangling symbolic link file_test() will return true for Glib::FILE_TEST_IS_SYMLINK and false for all other flags.
filename A filename to test.
test Bitfield of Glib::FileTest flags.
Whether a test was true.

Definition at line 130 of file fileutils.cc.

  return g_file_test(filename.c_str(), static_cast<GFileTest>(unsigned(test)));

Generated by  Doxygen 1.6.0   Back to index