Re: Creating file of size x
- From: Jan Danielsson <jan.danielsson@xxxxxxxxx>
- Date: Tue, 07 Jun 2005 01:29:21 +0200
Grant Edwards wrote:
>>>> Is there any way to create a file with a specified size?
>>>
>>>What do you want to put in the file? Once you've answered that
>>>question, the solution should present itself.
>>
>>Check blocks from an FEC-encoder (Freenet, more specifically).
>>
>> The problem is that the design I'm working on won't guarantee what
>>order the blocks will be returned in -- so I need to be able to seek to
>>block n's location and write the ckeck block.
>
> Exactly. And precisely how did that fail?
It didn't -- but that's on my platform; I have no idea how it'll work
on another platform; which is why I wanted to be able to first create
the file of the specified size, and then start writing to it.
>>Next block could be m, where m < n. So, they aren't continous.
>
> If you do a seek before each write, it doesn't matter.
According to Python, posix, Linux, Windows, ANSI-C?
.
- Follow-Ups:
- Re: Creating file of size x
- From: Grant Edwards
- Re: Creating file of size x
- References:
- Creating file of size x
- From: Jan Danielsson
- Re: Creating file of size x
- From: Erik Max Francis
- Re: Creating file of size x
- From: Jan Danielsson
- Re: Creating file of size x
- From: Grant Edwards
- Creating file of size x
- Prev by Date: Re: Creating file of size x
- Next by Date: Re: Creating file of size x
- Previous by thread: Re: Creating file of size x
- Next by thread: Re: Creating file of size x
- Index(es):