Jump to content

Truncate a file: Difference between revisions

Added 11l
(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}}==
1,481

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.