View Issue Details

IDProjectCategoryView StatusLast Update
0000167LDMudEfunspublic2009-09-27 18:17
ReporterlarsAssigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status newResolutionopen 
Summary0000167: New efun truncate_file()
DescriptionShort: new efun truncate_file()
From: Alfe
Date: Wed, 16 Dec 1998 21:11:51 +0100 (MET)
Type: Feature
State: Acknowledged

speaking of such: i'd like a truncate_file() efun which truncates files
(you guessed that from the name already?). the current simulefun
implementation in TubMud for that function is rather ugly, copying the
file to a new one until the truncate position is reached and then removing
the original and renaming the copy. for copying it also has to work
around the read/write_bytes limitation.

Note: make this a special mode of copy_file(),
e.g. copy_file(from,to,start,len)?
TagsNo tags attached.
External Data (URL)

Activities

zesstra

2009-09-27 18:17

administrator   ~0001317

ok, truncation can be achieved with write_file(,,1), but not from a specific position onwards. But is it really common to just truncate a file to a certain length without knowing whats inside? And if I know the data, then probably I can just use write_file(file, data, 1). Or do you have really big files in mind?

Issue History

Date Modified Username Field Change
2004-11-26 22:05 lars New Issue
2009-09-27 18:17 zesstra Note Added: 0001317