public static function write($dst, $content, $mode=null, $append=false) {
		if($mode === null)
			$mode = static::OVERRIDE;

		if($mode & static::RENAME)
			$dst = static::getNewFilename($dst);
		elseif($mode & static::OVERRIDE)
			static::delete($dst);
		elseif(file_exists($dst))
			return false;

		static::mkdir(dirname($dst));
		$r = file_put_contents($dst, $content, $append ? FILE_APPEND:0);

		if($r !== false)
			return $dst;
		return false;
	}
public static function write($dst, $content, $mode=null, $append=false) {
		if($mode === null)
			$mode = static::OVERRIDE;

		if($mode & static::RENAME)
			$dst = static::getNewFilename($dst);
		elseif($mode & static::OVERRIDE)
			static::delete($dst);
		elseif(file_exists($dst))
			return false;

		static::mkdir(dirname($dst));
		$r = file_put_contents($dst, $content, $append ? FILE_APPEND:0);

		if($r !== false)
			return $dst;
		return false;
	}
public static function write ( $ dst , $ content , $ mode = null , $ append = false ) { if ( $ mode === null ) $ mode = static :: OVERRIDE ; if ( $ mode & static :: RENAME ) $ dst = static :: getNewFilename ( $ dst ) ; elseif ( $ mode & static :: OVERRIDE ) static :: delete ( $ dst ) ; elseif ( file_exists ( $ dst ) ) return false ; static :: mkdir ( dirname ( $ dst ) ) ; $ r = file_put_contents ( $ dst , $ content , $ append ? FILE_APPEND : 0 ) ; if ( $ r !== false ) return $ dst ; return false ; }
Write into a file.
@param  string  $dst
@param  string  $content
@param  integer $mode
@param  boolean $append
@return boolean true for success, otherwise false
Write into a file .