GopeedLab / gopeed

A modern download manager that supports all platforms. Built with Golang and Flutter.
https://gopeed.com
GNU General Public License v3.0
15.99k stars 1.13k forks source link

支持预分配文件 #583

Open xixky opened 3 months ago

xixky commented 3 months ago

Description(required)

希望可以和aria2一样,设置里面可以设置预分配文件的方式。 https://github.com/GopeedLab/gopeed/blob/8b3b5d4394df67dad87bccfb335843308d95df86/internal/controller/controller.go#L42

使用fallocate

cmd := exec.Command("fallocate", "-l", “1G”,name)

使用truncate

cmd := exec.Command("truncate", "-s", “1G”,name)

App Version(required)

OS Version(required)

linux

Snapshots

Log