/// <summary>Copy constructor.</summary> /// <param name="other">FileStatus to copy</param> /// <exception cref="System.IO.IOException"/> public FileStatus(Org.Apache.Hadoop.FS.FileStatus other) : this(other.GetLen(), other.IsDirectory(), other.GetReplication(), other.GetBlockSize (), other.GetModificationTime(), other.GetAccessTime(), other.GetPermission(), other .GetOwner(), other.GetGroup(), (other.IsSymlink() ? other.GetSymlink() : null), other.GetPath()) { }
/// <summary>Compare if this object is equal to another object</summary> /// <param name="o">the object to be compared.</param> /// <returns>true if two file status has the same path name; false if not.</returns> public override bool Equals(object o) { if (o == null) { return(false); } if (this == o) { return(true); } if (!(o is Org.Apache.Hadoop.FS.FileStatus)) { return(false); } Org.Apache.Hadoop.FS.FileStatus other = (Org.Apache.Hadoop.FS.FileStatus)o; return(this.GetPath().Equals(other.GetPath())); }
/// <summary>Compare this object to another object</summary> /// <param name="o">the object to be compared.</param> /// <returns> /// a negative integer, zero, or a positive integer as this object /// is less than, equal to, or greater than the specified object. /// </returns> /// <exception cref="System.InvalidCastException"> /// if the specified object's is not of /// type FileStatus /// </exception> public virtual int CompareTo(object o) { Org.Apache.Hadoop.FS.FileStatus other = (Org.Apache.Hadoop.FS.FileStatus)o; return(this.GetPath().CompareTo(other.GetPath())); }