Re: Set FileSize



FileStream.SetLength does work, however it reminded me of my problem with
it; it appears to have a 2 GB limit. Is there a way to get past the Long
and use an Integer?


"Mattias Sjögren" <mattias.dont.want.spam@xxxxxxxx> wrote in message
news:%23HtIfswuFHA.1560@xxxxxxxxxxxxxxxxxxxxxxx
>
>>I am looking to set the size an existing file. I have a file that I am
>>storing data in, in a binary format. Upon deletion of data, I reorder the
>>data to the top of the file. Now that I have all of this free space, how
>>do
>>I resize the file?
>
> FileStream.SetLength
>
>
>
> Mattias
>
> --
> Mattias Sjögren [MVP] mattias @ mvps.org
> http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
> Please reply only to the newsgroup.


.



Relevant Pages

  • Re: Sys tray
    ... > Can't you just set the FormBorderStyle property to SizableToolWindow? ... > Please reply only to the newsgroup. ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: set default encoding
    ... >>Is there a way to set what Default.Encoding returns in an appliaiton? ... > Please reply only to the newsgroup. ... Prev by Date: ...
    (microsoft.public.dotnet.framework)
  • Re: Commenting a class and its methods
    ... you have to put the attribute on the get/set accessor ... Mattias ... Please reply only to the newsgroup. ... Prev by Date: ...
    (microsoft.public.dotnet.framework.interop)
  • Re: VB.NET 2003 - Inheritance issue
    ... Constructors are never inherited and therefore not overridable. ... Mattias ... Please reply only to the newsgroup. ... Prev by Date: ...
    (microsoft.public.dotnet.languages.vb)
  • Re: How to control what framework version is used for an assembly?
    ... all the v2 compilers produce metadata that the ... Mattias ... Please reply only to the newsgroup. ... Prev by Date: ...
    (microsoft.public.dotnet.framework)