Exemple #1
0
    void FileNameAdd(File parent, long writeTime, string endName, File file)
    {
        if (file.fileId == 0)
        {
            file.fileId = ++lastFileId;
        }
        NameLink nameLink   = new NameLink(endName, file);
        string   foldedName = endName.ToLower();

        parent.children[foldedName] = nameLink;
        parent.writeTime            = writeTime;
        parent.changeTime           = writeTime;
        file.nameCount++;
        fileIds.Set(file.fileId, file);
    }
Exemple #2
0
    void FileOpened(File file, ref Pfm.OpenAttribs openAttribs)
    {
        Debug.Assert(file.openId != 0);
        OpenRef openRef = (OpenRef)(openRefs.Get(file.openId));

        if (openRef == null)
        {
            openRef = new OpenRef(file);
            openRefs.Set(file.openId, openRef);
        }
        openRef.openSequence           = ++lastOpenSequence;
        openAttribs.openId             = file.openId;
        openAttribs.openSequence       = openRef.openSequence;
        openAttribs.accessLevel        = Pfm.accessLevelWriteData;
        openAttribs.attribs.fileType   = file.fileType;
        openAttribs.attribs.fileFlags  = file.fileFlags;
        openAttribs.attribs.fileId     = file.fileId;
        openAttribs.attribs.createTime = file.createTime;
        openAttribs.attribs.accessTime = file.accessTime;
        openAttribs.attribs.writeTime  = file.writeTime;
        openAttribs.attribs.changeTime = file.changeTime;
        openAttribs.attribs.fileSize   = file.fileSize;
    }