Truncate a file: Difference between revisions
Added 11l
m (→{{header|R}}) |
Alextretyak (talk | contribs) (Added 11l) |
||
Line 14:
This task permits the use of such facilities. However, such behaviour should be noted, or optionally a warning message relating to an non change or increase in file size may be implemented.
<br><br>
=={{header|11l}}==
{{trans|Python}}
<lang 11l>F truncate_file(name, length)
I !fs:is_file(name)
R 0B
I length >= fs:file_size(name)
R 0B
fs:resize_file(name, length)
R 1B</lang>
=={{header|Ada}}==
|