public function add_file( $file, array $atts = array() ) {

		$parent = $this->get_file( dirname( $file ) );
		$filename = basename( $file );

		if ( false === $parent || true === isset( $parent->contents->$filename ) ) {
			return false;
		}

		$parent->contents->$filename = $this->get_default_atts( $atts );

		return true;
	}
public function add_file( $file, array $atts = array() ) {

		$parent = $this->get_file( dirname( $file ) );
		$filename = basename( $file );

		if ( false === $parent || true === isset( $parent->contents->$filename ) ) {
			return false;
		}

		$parent->contents->$filename = $this->get_default_atts( $atts );

		return true;
	}
public function add_file ( $ file , array $ atts = array ( ) ) { $ parent = $ this -> get_file ( dirname ( $ file ) ) ; $ filename = basename ( $ file ) ; if ( false === $ parent || true === isset ( $ parent -> contents -> $ filename ) ) { return false ; } $ parent -> contents -> $ filename = $ this -> get_default_atts ( $ atts ) ; return true ; }
Create a file or directory.

@since 0.1.0

@param string $file The path of the file/directory to create.
@param array  $atts The attributes of the file/directory.

@return bool True if the file was added, false otherwise.
Create a file or directory .