예제 #1
0
 /// <summary>Add file attributes that need to be preserved.</summary>
 /// <remarks>
 /// Add file attributes that need to be preserved. This method may be
 /// called multiple times to add attributes.
 /// </remarks>
 /// <param name="fileAttribute">- Attribute to add, one at a time</param>
 protected internal virtual void Preserve(CommandWithDestination.FileAttribute fileAttribute
                                          )
 {
     foreach (CommandWithDestination.FileAttribute attribute in preserveStatus)
     {
         if (attribute.Equals(fileAttribute))
         {
             return;
         }
     }
     preserveStatus.AddItem(fileAttribute);
 }
예제 #2
0
 /// <summary>Checks if the input attribute should be preserved or not</summary>
 /// <param name="attribute">- Attribute to check</param>
 /// <returns>boolean true if attribute should be preserved, false otherwise</returns>
 private bool ShouldPreserve(CommandWithDestination.FileAttribute attribute)
 {
     return(preserveStatus.Contains(attribute));
 }