// Pfm.FormatterDispatch.FlushFile public void FlushFile(Pfm.MarshallerFlushFileOp op) { long openId = op.OpenId(); int flushFlags = op.FlushFlags(); int fileFlags = op.FileFlags(); long createTime = op.CreateTime(); long accessTime = op.AccessTime(); long writeTime = op.WriteTime(); long changeTime = op.ChangeTime(); int perr = 0; Pfm.OpenAttribs openAttribs = new Pfm.OpenAttribs(); File file; perr = FileFindOpenId(openId, out file); if (perr == 0) { if (fileFlags != Pfm.fileFlagsInvalid) { file.fileFlags = fileFlags; } if (createTime != Pfm.timeInvalid) { file.createTime = createTime; } if (accessTime != Pfm.timeInvalid) { file.accessTime = accessTime; } if (writeTime != Pfm.timeInvalid) { file.writeTime = writeTime; } if (changeTime != Pfm.timeInvalid) { file.changeTime = changeTime; } if ((flushFlags & Pfm.flushFlagOpen) != 0) { FileOpened(file, ref openAttribs); } } op.Complete(perr, openAttribs, null); }
public void FlushFile(Pfm.MarshallerFlushFileOp op) { long openId = op.OpenId(); int fileFlags = op.FileFlags(); int color = op.Color(); long createTime = op.CreateTime(); long writeTime = op.WriteTime(); int perr = 0; Pfm.OpenAttribs openAttribs = new Pfm.OpenAttribs(); if (fileFlags != Pfm.fileFlagsInvalid || color != Pfm.colorInvalid || createTime != Pfm.timeInvalid || writeTime != Pfm.timeInvalid) { perr = Pfm.errorAccessDenied; } else if (openId == folderOpenId) { openAttribs.openId = folderOpenId; openAttribs.openSequence = 1; openAttribs.accessLevel = Pfm.accessLevelReadData; openAttribs.attribs.fileType = Pfm.fileTypeFolder; openAttribs.attribs.fileId = helloRootId; } else if (openId == fileOpenId) { openAttribs.openId = fileOpenId; openAttribs.openSequence = 1; openAttribs.accessLevel = Pfm.accessLevelReadData; openAttribs.attribs.fileType = Pfm.fileTypeFile; openAttribs.attribs.fileId = helloFileId; openAttribs.attribs.fileSize = helloFileData.Length; } else { perr = Pfm.errorNotFound; } op.Complete(perr, openAttribs, null); }