Pre-allocating drive space for file storage

后端 未结 4 1039
挽巷
挽巷 2021-02-06 11:39

Is there a Java way to pre-allocate drive space for exclusive usage in the application?

There is no requirement for this space to be a separate filesystem or a part of

4条回答
  •  悲&欢浪女
    2021-02-06 12:28

    You can pre-allocate space by writing a large file, but to be honest I wouldn't bother. Performance will be pretty good/ probably better than you need.

    If you really needed performance, you'd be writing C++/C# and doing RAW I/O.

    But that's typically only done when writing an RDBMS engine, high-volume media capture or similar.

提交回复
热议问题