features/bootstrap/FeatureContext.php
public function createFile($filename, PyStringNode $content, $readable = true) {
        $filename = rtrim($this->workingDir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . ltrim($filename, DIRECTORY_SEPARATOR);
        $path = dirname($filename);
        $content = str_replace("'''", '"""', (string) $content);

        if (!is_dir($path)) {
            mkdir($path, 0777, true);
        }

        file_put_contents($filename, $content);

        if (!$readable) {
            chmod($filename, 0000);
        }
    }
public function createFile($filename, PyStringNode $content, $readable = true) {
        $filename = rtrim($this->workingDir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . ltrim($filename, DIRECTORY_SEPARATOR);
        $path = dirname($filename);
        $content = str_replace("'''", '"""', (string) $content);

        if (!is_dir($path)) {
            mkdir($path, 0777, true);
        }

        file_put_contents($filename, $content);

        if (!$readable) {
            chmod($filename, 0000);
        }
    }
public function createFile ( $ filename , PyStringNode $ content , $ readable = true ) { $ filename = rtrim ( $ this -> workingDir , DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR . ltrim ( $ filename , DIRECTORY_SEPARATOR ) ; $ path = dirname ( $ filename ) ; $ content = str_replace ( "'''" , '"""' , ( string ) $ content ) ; if ( ! is_dir ( $ path ) ) { mkdir ( $ path , 0777 , true ) ; } file_put_contents ( $ filename , $ content ) ; if ( ! $ readable ) { chmod ( $ filename , 0000 ) ; } }
Creates a file with specified name and content in the current working dir

@param string $filename Name of the file relative to the working dir
@param PyStringNode $content Content of the file
@param boolean $readable Whether or not the created file is readable

@Given a file named :filename with:
Creates a file with specified name and content in the current working dir