コード例 #1
0
 public function getBytes()
 {
     try {
         $data = tink_core_Outcome::Success(sys_io_File::getBytes($this->tmpFileName));
         return tink_core__Future_Future_Impl_::sync($data);
     } catch (Exception $__hx__e) {
         $_ex_ = $__hx__e instanceof HException ? $__hx__e->e : $__hx__e;
         $e = $_ex_;
         $data1 = tink_core_Outcome::Failure(tink_core_TypedError::withData(null, "Error during TmpFileUpload.getBytes()", $e, _hx_anonymous(array("fileName" => "TmpFileUpload.hx", "lineNumber" => 66, "className" => "ufront.web.upload.TmpFileUpload", "methodName" => "getBytes"))));
         return tink_core__Future_Future_Impl_::sync($data1);
     }
 }
コード例 #2
0
 static function get_bin_content($fullpath)
 {
     return sys_io_File::getBytes($fullpath);
 }
コード例 #3
0
ファイル: Store.class.php プロジェクト: komcdo/winnow
 public function readBinary()
 {
     return sys_io_File::getBytes($this->file);
 }
コード例 #4
0
ファイル: Cache.class.php プロジェクト: marcdraco/Webrathea
 static function load_asset($pathname)
 {
     $fullpath = _hx_string_or_null(system_base_Wet_base::$asset_path) . _hx_string_or_null($pathname);
     $etag = null;
     if (file_exists($fullpath)) {
         $stats = sys_FileSystem::stat($fullpath);
         $etag = _hx_string_or_null(StringTools::hex($stats->size, null)) . "-" . _hx_string_or_null(StringTools::hex($stats->ino, null)) . "-" . _hx_string_or_null(_hx_string_call(_hx_string_call($stats->mtime, "toString", array()), "substr", array(17, 2)));
     } else {
         $etag = "";
     }
     if ($etag === "") {
         throw new HException(new system_base_Http_exception("", 404, _hx_anonymous(array("fileName" => "Cache.hx", "lineNumber" => 294, "className" => "system.base.Cache", "methodName" => "load_asset"))));
     }
     if (php_Web::getClientHeader("If-none-match") === $etag) {
         php_Web::setReturnCode(304);
         return;
     }
     $value = null;
     $value = system_base_Cache_0($etag, $fullpath, $pathname, $value);
     header("Content-Type" . ": " . _hx_string_or_null($value));
     header("ETag" . ": " . _hx_string_or_null($etag));
     $value1 = Std::string(sys_FileSystem::stat($fullpath)->size);
     header("Content-Length" . ": " . _hx_string_or_null($value1));
     $m = null;
     $_this = sys_io_File::getBytes($fullpath);
     $m = $_this->b;
     $message = null;
     $message = Std::string($m);
     haxe_Log::trace("DEPRECATED FUNCTION: " . _hx_string_or_null($message), _hx_anonymous(array("fileName" => "Base.hx", "lineNumber" => 449, "className" => "system.base.Wet_base", "methodName" => "echo")));
 }