Index: modules/system/system.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.56
diff -u -p -r1.56 system.install
--- modules/system/system.install	6 Dec 2006 16:24:12 -0000	1.56
+++ modules/system/system.install	7 Dec 2006 03:32:14 -0000
@@ -106,6 +106,33 @@ function system_requirements($phase) {
     $requirements['cron']['title'] = $t('Cron maintenance tasks');
   }
 
+  // Test files directory
+  if ($phase == 'runtime') {
+    $directory = file_directory_path();
+    $is_writable = is_writable($directory);
+    if (!$is_writable) {
+      $desc = is_dir($directory) ? t('The directory %directory is not writable', array('%directory' => $directory)) : t('The directory %directory does not exist.', array('%directory' => $directory));
+      $requirements['file system'] = array(
+        'value' => $t('Not writable'),
+        'severity' => REQUIREMENT_WARNING,
+        'description' => $desc. ' '. $t('You may need to set the correct directory at the !admin-file-system settings page or change the choosen directory\'s permissions so that it is writable.', array('!admin-file-system' => l(t('File system'), 'admin/settings/file-system'))),
+      );
+    }
+    else {
+      if (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PUBLIC) {
+        $requirements['file system'] = array(
+         'value' => $t('Writable; using public download method'),
+        );
+      }
+      else {
+        $requirements['file system'] = array(
+         'value' => $t('Writable; using private download method'),
+        );        
+      }
+    }
+    $requirements['file system']['title'] = $t('File system');
+  }
+
   // See if updates are available in update.php.
   if ($phase == 'runtime') {
     $requirements['update'] = array(
