classes/phing/system/io/PhingFile.php
public function createNewFile($parents = true, $mode = 0777)
    {
        /**
         * @var PhingFile $parent
         */
        $parent = $this->getParentFile();
        if ($parents && $parent !== null && !$parent->exists()) {
            $parent->mkdirs();
        }

        $file = FileSystem::getFileSystem()->createNewFile($this->path);

        return $file;
    }
public function createNewFile($parents = true, $mode = 0777)
    {
        /**
         * @var PhingFile $parent
         */
        $parent = $this->getParentFile();
        if ($parents && $parent !== null && !$parent->exists()) {
            $parent->mkdirs();
        }

        $file = FileSystem::getFileSystem()->createNewFile($this->path);

        return $file;
    }
public function createNewFile ( $ parents = true , $ mode = 0777 ) { /**
         * @var PhingFile $parent
         */ $ parent = $ this -> getParentFile ( ) ; if ( $ parents && $ parent !== null && ! $ parent -> exists ( ) ) { $ parent -> mkdirs ( ) ; } $ file = FileSystem :: getFileSystem ( ) -> createNewFile ( $ this -> path ) ; return $ file ; }
Atomically creates a new, empty file named by this abstract pathname if
and only if a file with this name does not yet exist.  The check for the
existence of the file and the creation of the file if it does not exist
are a single operation that is atomic with respect to all other
filesystem activities that might affect the file.

@param  bool $parents
@param  int $mode
@throws IOException
@return boolean     true if the named file does not exist and was
successfully created; <code>false</code> if the named file
already exists
Atomically creates a new empty file named by this abstract pathname if and only if a file with this name does not yet exist . The check for the existence of the file and the creation of the file if it does not exist are a single operation that is atomic with respect to all other filesystem activities that might affect the file .