public override bool Equals(object obj) { if (obj == null || GetType() != obj.GetType()) { return(false); } var compareTo = (LocalStorageLocation)obj; return(RootPath.Equals(compareTo.RootPath, StringComparison.CurrentCultureIgnoreCase)); }
public bool Equals(FileItem other) { if (Object.ReferenceEquals(other, null)) { return(false); } if (object.ReferenceEquals(this, other)) { return(true); } return(FileName.Equals(other.FileName) && RootPath.Equals(other.RootPath) && SHAHash.Equals(other.SHAHash) && FileSize.Equals(other.FileSize)); }
private void AutoCreateDir(string ftpFile) { if (!MakeDirIfNotExist) return; string folderWhole = RootPath.Equals("") ? ftpFile : RootPath + "/" + ftpFile; string[] dirs = folderWhole.Replace("//", "/").Split('/'); string folder = ""; for (int i = 0; i<dirs.Length - 1; i++) { string dir = dirs[i]; if (dir.Equals("")) continue; List<string> lst = GetDirectoryList(folder); if (!lst.Contains(dir)) { MakeDir(folder + "/" + dir); } folder += "/" + dir; } }
/// <summary> /// Returns true if OrgApacheJackrabbitOakSegmentAzureAzureSegmentStoreServiceProperties instances are equal /// </summary> /// <param name="other">Instance of OrgApacheJackrabbitOakSegmentAzureAzureSegmentStoreServiceProperties to be compared</param> /// <returns>Boolean</returns> public bool Equals(OrgApacheJackrabbitOakSegmentAzureAzureSegmentStoreServiceProperties other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( AccountName == other.AccountName || AccountName != null && AccountName.Equals(other.AccountName) ) && ( ContainerName == other.ContainerName || ContainerName != null && ContainerName.Equals(other.ContainerName) ) && ( AccessKey == other.AccessKey || AccessKey != null && AccessKey.Equals(other.AccessKey) ) && ( RootPath == other.RootPath || RootPath != null && RootPath.Equals(other.RootPath) ) && ( ConnectionURL == other.ConnectionURL || ConnectionURL != null && ConnectionURL.Equals(other.ConnectionURL) )); }
/// <summary> /// Returns true if ComAdobeAemUpgradePrechecksTasksImplConsistencyCheckTaskImplProperties instances are equal /// </summary> /// <param name="other">Instance of ComAdobeAemUpgradePrechecksTasksImplConsistencyCheckTaskImplProperties to be compared</param> /// <returns>Boolean</returns> public bool Equals(ComAdobeAemUpgradePrechecksTasksImplConsistencyCheckTaskImplProperties other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( RootPath == other.RootPath || RootPath != null && RootPath.Equals(other.RootPath) ) && ( FixInconsistencies == other.FixInconsistencies || FixInconsistencies != null && FixInconsistencies.Equals(other.FixInconsistencies) )); }
private void init(string ftpFile) { string uri = string.Format(@"ftp://{0}:{1}/", Host, Port); if (RootPath.Equals("")) { uri += ftpFile; } else { uri += RootPath + "/" + ftpFile; } // 根据uri创建FtpWebRequest对象 ftpReq = (FtpWebRequest)FtpWebRequest.Create(new Uri(uri)); ftpReq.Credentials = new NetworkCredential(UserName, UserPassword); // ftp用户名和密码 ftpReq.KeepAlive = KeepAlive; ftpReq.UsePassive = UsePasv; ftpReq.EnableSsl = UseSSL; ftpReq.UseBinary = UseBinary; ftpReq.Timeout = TimeOut; ftpReq.ReadWriteTimeout = TimeOut; }