You are here

function xmlsitemap_check_directory in XML sitemap 6.2

Same name and namespace in other branches
  1. 8 xmlsitemap.module \xmlsitemap_check_directory()
  2. 7.2 xmlsitemap.module \xmlsitemap_check_directory()
  3. 2.x xmlsitemap.module \xmlsitemap_check_directory()

Check that the sitemap files directory exists and is writable.

4 calls to xmlsitemap_check_directory()
XMLSitemapTestHelper::checkFilesDirectory in ./xmlsitemap.test
Check the files directory is created (massive fails if not done).
xmlsitemap_enable in ./xmlsitemap.install
Implements hook_enable().
xmlsitemap_regenerate_batch_generate in ./xmlsitemap.generate.inc
Batch callback; generate all pages of a sitemap.
xmlsitemap_requirements in ./xmlsitemap.install
Implements hook_requirements().

File

./xmlsitemap.module, line 792
Main file for the xmlsitemap module.

Code

function xmlsitemap_check_directory(stdClass $sitemap = NULL) {
  $directory = xmlsitemap_get_directory($sitemap);
  return file_check_directory($directory, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS);
}