Function fileToBinary

  • 文件转二进制 Binary

    Parameters

    • file: LooseFile

    Returns string

    0.1.0

    const imagePath = _.createPath(_.pathDesktop.fsName, "image.png");
    _.log(_.fileToBinary(imagePath));
    // 结果:桌面日志会记录桌面上 image 图片的二进制数据。