コード例 #1
0
 public XlFile(string path, XLPack.pack_stat2 stat)
 {
     Path       = path;
     CreateTime = DateTime.FromFileTime(stat.stat.creationTime);
     ModifyTime = DateTime.FromFileTime(stat.stat.modifiedTime);
     Hash       = BitConverter.ToString(stat.digest.md5).Replace("-", "").ToLower();
     Size       = stat.length;
 }
コード例 #2
0
        private static TreeDictionary.XlFile GetFileStat2(string path)
        {
            if (!XLPack.IsFileExist(path))
            {
                return(null);
            }
            var position = XLPack.FOpen(path, "r");
            var stat2    = new XLPack.pack_stat2();
            var res      = XLPack.FGetStat(position, ref stat2);

            XLPack.FClose(ref position);
            return(res ? new TreeDictionary.XlFile(path, stat2) : null);
        }