![]() ![]() ![]() If the specified filename does not exist, or the provided length is not less than the current file length, then the routine should raise an appropriate error condition. The file may contain non human readable binary data in an unspecified format, so the routine should be "binary safe", leaving the contents of the untruncated part of the file unchanged. Truncation can be achieved using system or library calls intended for such a task, if such methods exist, or by creating a temporary file of a reduced size and renaming it, after first deleting the original file, if no other method is available. This should be implemented as a routine that takes two parameters: the filename and the required file length (in bytes). You are encouraged to solve this task according to the task description, using any language you may know. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |