Ai
1 Star 0 Fork 0

g1a22/mirror-gitlab-org-gitlab-ce

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
file_streamer.rb 301 Bytes
一键复制 编辑 原始数据 按行查看 历史
Kamil Trzcinski 提交于 2015-10-13 05:47 +08:00 . Implement Build Artifacts
class FileStreamer #:nodoc:
attr_reader :to_path
def initialize(path)
@to_path = path
end
# Stream the file's contents if Rack::Sendfile isn't present.
def each
File.open(to_path, 'rb') do |file|
while chunk = file.read(16384)
yield chunk
end
end
end
end
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gyiang/mirror-gitlab-org-gitlab-ce.git
git@gitee.com:gyiang/mirror-gitlab-org-gitlab-ce.git
gyiang
mirror-gitlab-org-gitlab-ce
mirror-gitlab-org-gitlab-ce
master

搜索帮助