src/classes/CCFile.php
public static function write( $path, $content ) 
	{
		static::mkdir( $path );

		// if writing the file fails
		if ( file_put_contents( $path, $content, LOCK_EX ) === false ) 
		{

			if ( static::_can_print() ) 
			{
				CCCli::line( CCCli::color( 'failure', 'red' ).' creating '.$path );
			}

			return false;
		}

		// everything went good
		if ( static::_can_print() ) 
		{
			CCCli::line( CCCli::color( 'created', 'green' ).' '.$path );
		}

		return true;
	}
public static function write( $path, $content ) 
	{
		static::mkdir( $path );

		// if writing the file fails
		if ( file_put_contents( $path, $content, LOCK_EX ) === false ) 
		{

			if ( static::_can_print() ) 
			{
				CCCli::line( CCCli::color( 'failure', 'red' ).' creating '.$path );
			}

			return false;
		}

		// everything went good
		if ( static::_can_print() ) 
		{
			CCCli::line( CCCli::color( 'created', 'green' ).' '.$path );
		}

		return true;
	}
public static function write ( $ path , $ content ) { static :: mkdir ( $ path ) ; // if writing the file fails if ( file_put_contents ( $ path , $ content , LOCK_EX ) === false ) { if ( static :: _can_print ( ) ) { CCCli :: line ( CCCli :: color ( 'failure' , 'red' ) . ' creating ' . $ path ) ; } return false ; } // everything went good if ( static :: _can_print ( ) ) { CCCli :: line ( CCCli :: color ( 'created' , 'green' ) . ' ' . $ path ) ; } return true ; }
save a file

@param string 	$path
@param string		$content
@return bool
save a file