Ensuring the continuous physical allocation(storage) of a file in Hard disk
-
Hi, I have a requirement. 1) Create a 4 GB data file in Hard disk by writing 2 MB at time. ( Don't worry, that I can manage :)) 2) It should be stored in continous locations( clusters ) in hard disk. Is their any method to ensure that? Regards, VCSharp
-
Hi, I have a requirement. 1) Create a 4 GB data file in Hard disk by writing 2 MB at time. ( Don't worry, that I can manage :)) 2) It should be stored in continous locations( clusters ) in hard disk. Is their any method to ensure that? Regards, VCSharp
You would need to access the disk io API directory. Then via that 1. Find the contiguous clusters. 2. Mark them in use 3. Attach them to a file 4. Then write to the file, being careful to not exceed the maximum. Naturally the application must also have permissions to access the API.