예제 #1
0
    static void GetFileInfoAtFile(string fileFullName, string parentPath)
    {
        FileInfo fi = new FileInfo(fileFullName);
        string   path;

        if (parentPath == "")
        {
            path = fi.Name;
        }
        else
        {
            path = string.Format("{0}/{1}", parentPath, fi.Name);
        }

        int startIdx   = (int)contentByteLength;
        int fileLength = (int)fi.Length;

        contentByteLength += fi.Length;
        string lowerPath      = path.ToLower();
        string lowerName      = fi.Name.ToLower();
        uint   filePathHashID = lowerPath.GuiGetHashCode();
        uint   fileNameHashID = lowerName.GuiGetHashCode();

        Manifest.Append(string.Format("{0},{1},{2},{3}|", filePathHashID, fileNameHashID, startIdx, fileLength));
    }