Preallocating file space in C#?

后端 未结 3 515
清酒与你
清酒与你 2021-02-05 08:40

I am creating a downloading application and I wish to preallocate room on the harddrive for the files before they are actually downloaded as they could potentially be rather lar

3条回答
  •  深忆病人
    2021-02-05 09:18

    FileStream.SetLength is the one you want. The syntax:

    public override void SetLength(
        long value
    )
    

提交回复
热议问题