FileExists.php

Same filename and directory in other branches
  1. 11.x core/lib/Drupal/Core/File/FileExists.php
  2. 10 core/lib/Drupal/Core/File/FileExists.php

Namespace

Drupal\Core\File

File

core/lib/Drupal/Core/File/FileExists.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Core\File;


/**
 * A flag for defining the behavior when dealing with existing files.
 */
enum FileExists
{
  /* Appends a number until name is unique. */
  case Rename;
  /* Replace the existing file. */
  case Replace;
  /* Do nothing and return FALSE. */
  case Error;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.