File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,12 @@ public static class CommandProcessor
99
1010    public  static   void  Process ( List < string >  args ) 
1111    { 
12+         if  ( File . Exists ( args [ 0 ] ) )  { 
13+             WindowHelper . SetWindowMode ( WindowMode . Hidden ) ; 
14+             ProcessShellInput ( args [ 0 ] ) ; 
15+             return ; 
16+         } 
17+ 
1218        if  ( args [ 0 ] . AsFlag ( )  ==  'h' )  { 
1319            Console . WriteLine ( """ 
1420                Compress a file: 
@@ -44,6 +50,16 @@ public static char AsFlag(this string input)
4450        return  input [ input . LastIndexOf ( '-' )  +  1 ] ; 
4551    } 
4652
53+     public  static   void  ProcessShellInput ( string  input ) 
54+     { 
55+         if  ( input . EndsWith ( ".zs" ) )  { 
56+             Decompress ( input ,  new ( ) ) ; 
57+         } 
58+         else  { 
59+             Compress ( input ,  new ( ) ) ; 
60+         } 
61+     } 
62+ 
4763    public  static   void  Compress ( string  input ,  Dictionary < char ,  string >  flags ) 
4864    { 
4965        flags . TryGetValue ( 'o' ,  out  string ?  output ) ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments