Ejemplo n.º 1
0
 public static void MoveLogFiles( KeepBack.Ctrl ctrl )
 {
     try
     {
         string src = ctrl.Path;
         string dst = ctrl.CreateLogFolder();
         foreach( string x in KeepBack.Ctrl.ListFiles( src ) )
         {
             if( (Path.GetExtension( x ).ToLower() == ".log") && KeepBack.Ctrl.IsDateFolder( x ) )
             {
                 File.Move( Path.Combine( src, x ), Path.Combine( dst, x ) );
             }
         }
     }
     catch( Exception )
     {
     }
 }
Ejemplo n.º 2
0
 //--- method ----------------------------
 public void Upgrade( KeepBack.CtrlFilter filter, KeepBack.CtrlFilter.ActionType action )
 {
     filter.Action  = action;
     filter.Pattern = Pattern;
 }
Ejemplo n.º 3
0
 //--- method ----------------------------
 public void Upgrade( KeepBack.CtrlArchive archive )
 {
     archive.Month   = Month;
     archive.Day     = Day;
     archive.Hour    = Hour;
     archive.Minute  = Minute;
     foreach( CtrlFolder f in folders )
     {
         f.Upgrade( archive.FolderAdd() );
     }
 }
Ejemplo n.º 4
0
 //--- method ----------------------------
 public void Upgrade( KeepBack.CtrlFolder folder )
 {
     folder.Name    = Name;
     folder.Path    = Path;
     if( exclude != null )
     {
         foreach( CtrlPattern p in exclude )
         {
             p.Upgrade( folder.FilterAdd(), KeepBack.CtrlFilter.ActionType.Exclude );
         }
     }
     if( include != null )
     {
         foreach( CtrlPattern p in include )
         {
             p.Upgrade( folder.FilterAdd(), KeepBack.CtrlFilter.ActionType.Include );
         }
     }
     if( history != null )
     {
         foreach( CtrlPattern p in history )
         {
             p.Upgrade( folder.FilterAdd(), KeepBack.CtrlFilter.ActionType.History );
         }
     }
 }