【问题标题】:SML comparing files at the bit levelSML 在位级别比较文件
【发布时间】:2010-09-18 10:44:30
【问题描述】:

我正在尝试使用 SML 比较目录中的文件。使用 TextIO 库相当容易,但我需要在位级别比较文件。也就是说,二进制比较。我正在使用类似于此的功能:

fun listDir (s) = let
    fun loop (ds) = (case OS.FileSys.readDir (ds)
        of "" => [] before OS.FileSys.closeDir (ds)
      | file => file::loop (ds))
      val ds = OS.FileSys.openDir (s)
      in
         loop (ds) handle e => (OS.FileSys.closeDir (ds); raise (e))
      end

列出给定目录中的所有文件。但是现在,我需要查看每个文件中的位。有什么建议吗?

【问题讨论】:

    标签: sml smlnj


    【解决方案1】:

    看看BinIO structure

    【讨论】:

      猜你喜欢
      • 2014-10-26
      • 2013-08-22
      • 2017-02-25
      • 2020-08-18
      • 2018-12-05
      • 2021-03-23
      • 1970-01-01
      • 2018-04-28
      • 1970-01-01
      相关资源
      最近更新 更多