是否有可能创建一个没有EOF标记的文件? [英] Is it possible to create a file with no EOF marker?
问题描述
有没有办法创建一个没有EOF标记的平面文件?也许我可以使用一个工具,从现有的文本文件中删除EOF标记?
平面文件不包含结束。
几乎所有的现代文件系统都是基于流的,只是一堆磁盘上的字节,它们没有记录/文件标记。
读取文件的std库添加了任何文件结束信号
您应该测试它是否正确处理不完整的行(即3个值而不是4个)和缺少/不同的行结束(CR或LF,而不是CR / LF)
We have an application that reads in a flat file and parses out the data. This file contains no header information or total data with which to do a checksum. So I would like to create test cases to make sure our application properly handles "incomplete" files.
Is there a way to create a flat file with no EOF marker? Perhaps a tool that I can use to remove the EOF marker from an existing text file?
Flat files do not contain an end of file marker.
Almost all modern filesystems are stream based, just a bunch of bytes on disk, they don't have record/file markers.
Any end-of-file signal is added by the std library reading the file
You should test that it deals properly with incomplete lines (ie 3 values rather than 4) and missing/differnet end of lines (CR or LF rather than CR/LF)
这篇关于是否有可能创建一个没有EOF标记的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!