/// <summary>
 /// Constructor for reading a file info from disk
 /// </summary>
 /// <param name="Reader">Binary reader to read data from</param>
 /// <param name="Directory">Parent directory</param>
 public StreamFileInfo(BinaryReader Reader, StreamDirectoryInfo Directory)
 {
     this.Name                 = Reader.ReadString();
     this.Length               = Reader.ReadInt64();
     this.ContentId            = new FileContentId(Reader);
     this.Directory            = Directory;
     this.DepotFileAndRevision = Reader.ReadString();
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="Name">Name of this file</param>
 /// <param name="Length">Length of the file on the server</param>
 /// <param name="ContentId">Content id for this file</param>
 /// <param name="Directory">The parent directory</param>
 /// <param name="DepotFileAndRevision">The depot file and revision that need to be synced for this file</param>
 public StreamFileInfo(string Name, long Length, FileContentId ContentId, StreamDirectoryInfo Directory, string DepotFileAndRevision)
 {
     this.Name                 = Name;
     this.Length               = Length;
     this.ContentId            = ContentId;
     this.Directory            = Directory;
     this.DepotFileAndRevision = DepotFileAndRevision;
 }
 public WorkspaceFileInfo(WorkspaceDirectoryInfo Directory, BinaryReader Reader)
 {
     this.Directory         = Directory;
     this.Name              = Reader.ReadString();
     this.Length            = Reader.ReadInt64();
     this.LastModifiedTicks = Reader.ReadInt64();
     this.bReadOnly         = Reader.ReadBoolean();
     this.ContentId         = Reader.ReadObject <FileContentId>();
 }
 public WorkspaceFileInfo(WorkspaceDirectoryInfo Directory, string Name, long Length, long LastModifiedTicks, bool bReadOnly, FileContentId ContentId)
 {
     this.Directory         = Directory;
     this.Name              = Name;
     this.Length            = Length;
     this.LastModifiedTicks = LastModifiedTicks;
     this.bReadOnly         = bReadOnly;
     this.ContentId         = ContentId;
 }
 public TrackedFileInfo(DirectoryReference CacheDir, BinaryReader Reader)
 {
     this.CacheDir          = CacheDir;
     this.ContentId         = Reader.ReadObject <FileContentId>();
     this.CacheId           = Reader.ReadUInt64();
     this.Length            = Reader.ReadInt64();
     this.LastModifiedTicks = Reader.ReadInt64();
     this.bReadOnly         = Reader.ReadBoolean();
     this.SequenceNumber    = Reader.ReadUInt32();
 }
 public TrackedFileInfo(DirectoryReference CacheDir, FileContentId ContentId, ulong CacheId, long Length, long LastModifiedTicks, bool bReadOnly, uint SequenceNumber)
 {
     this.CacheDir          = CacheDir;
     this.ContentId         = ContentId;
     this.CacheId           = CacheId;
     this.Length            = Length;
     this.LastModifiedTicks = LastModifiedTicks;
     this.bReadOnly         = bReadOnly;
     this.SequenceNumber    = SequenceNumber;
 }
Example #7
0
        public override bool Equals(object Other)
        {
            FileContentId OtherContentId = Other as FileContentId;

            if (OtherContentId == null)
            {
                return(false);
            }

            for (int Idx = 0; Idx < DigestLength; Idx++)
            {
                if (OtherContentId.Digest[Idx] != Digest[Idx])
                {
                    return(false);
                }
            }

            if (OtherContentId.Type != Type)
            {
                return(false);
            }

            return(true);
        }
 public WorkspaceFileInfo(WorkspaceDirectoryInfo Directory, string Name, FileInfo Info, FileContentId ContentId)
     : this(Directory, Name, Info.Length, Info.LastWriteTimeUtc.Ticks, Info.Attributes.HasFlag(FileAttributes.ReadOnly), ContentId)
 {
 }
 public WorkspaceFileInfo(WorkspaceDirectoryInfo Directory, string Name, FileContentId ContentId)
 {
     this.Directory = Directory;
     this.Name      = Name;
     this.ContentId = ContentId;
 }