Beispiel #1
0
 /// <summary>
 /// Check that description has content.
 /// </summary>
 /// <returns></returns>
 string ValidateDescription()
 {
     // TODO Check for existing identical Description
     if (SharpToolsUtility.IsStringEmpty(Description))
     {
         return("No valid description");
     }
     return(null);
 }
Beispiel #2
0
 /// <summary>
 /// Check that destination path is valid and user has access.
 /// </summary>
 /// <returns></returns>
 string ValidateDestination()
 {
     if (SharpToolsUtility.IsStringEmpty(DstRoot) || !System.IO.Directory.Exists(DstRoot))
     {
         return("No valid destination root");
     }
     // TODO Account for network seurity.
     else if (!(SharpTools.File.Access.SharpToolsFileAccess.DirectoryHasPermission(DstRoot, System.Security.AccessControl.FileSystemRights.Write)))
     {
         return("No write access for " + WindowsIdentity.GetCurrent().Name);
     }
     return(null);
 }