|
-
Feb 27th, 2004, 01:15 PM
#1
truncating a file... whats the right way
I have a log file and I want to make sure it doesn grow bigger than a certain size. I open it with the FileStream class and just call the FileStream.SetLength method... am I on the right track? because I dont know if SetLength is made for that purpose or not
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Feb 27th, 2004, 02:06 PM
#2
Sleep mode
Originally posted by MrPolite
I have a log file and I want to make sure it doesn grow bigger than a certain size. I open it with the FileStream class and just call the FileStream.SetLength method... am I on the right track? because I dont know if SetLength is made for that purpose or not
I don't think this method works this way . I imagine , it set the length of the stream to be written at once (not the length of the file) not sure though .
-
Feb 27th, 2004, 02:08 PM
#3
Sleep mode
as a workaround this , check for file size if bigger than the size you want it to be , don't write , otherwise write and check again .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|