Programming-Idioms

History of Idiom 199 > diff from v3 to v4

Edit summary for version 4 :
New Csharp implementation by user [bigwavedave]

Version 3

2019-10-05, 22:42:52

Version 4

2019-10-07, 21:58:20

Idiom #199 Truncate a file at the current file position

Truncate a file F at the give file position.

Idiom #199 Truncate a file at the current file position

Truncate a file F at the give file position.

Imports
using System.IO;
Code
var F = new FileStream("F", FileMode.Open)
// advance into F here
F.SetLength(F.Position);
Comments bubble
Assumes code reads F to advance position into file stream.