lib/blobfolio/common/file.php
public static function data_uri(string $path) {
		ref\cast::string($path, true);
		ref\file::path($path, true);

		if ((false !== $path) && @\is_file($path)) {
			$content = \base64_encode(@\file_get_contents($path));
			$finfo = mime::finfo($path);

			return "data:{$finfo['mime']};base64,{$content}";
		}

		return false;
	}
public static function data_uri(string $path) {
		ref\cast::string($path, true);
		ref\file::path($path, true);

		if ((false !== $path) && @\is_file($path)) {
			$content = \base64_encode(@\file_get_contents($path));
			$finfo = mime::finfo($path);

			return "data:{$finfo['mime']};base64,{$content}";
		}

		return false;
	}
public static function data_uri ( string $ path ) { ref \ cast :: string ( $ path , true ) ; ref \ file :: path ( $ path , true ) ; if ( ( false !== $ path ) && @ \ is_file ( $ path ) ) { $ content = \ base64_encode ( @ \ file_get_contents ( $ path ) ) ; $ finfo = mime :: finfo ( $ path ) ; return "data:{$finfo['mime']};base64,{$content}" ; } return false ; }
Get Data-URI From File

@param string $path Path.
@return string|bool Data-URI or false.
Get Data - URI From File