View Javadoc
1   package org.codehaus.plexus.archiver.util;
2   
3   import java.io.File;
4   import javax.annotation.Nonnull;
5   import org.codehaus.plexus.archiver.FileSet;
6   
7   /**
8    * Default implementation of {@link FileSet}.
9    *
10   * @since 1.0-alpha-9
11   */
12  public class DefaultFileSet
13      extends AbstractFileSet<DefaultFileSet>
14      implements FileSet
15  {
16  
17      private File directory;
18  
19      public DefaultFileSet( File directory )
20      {
21          this.directory = directory;
22      }
23  
24      public DefaultFileSet()
25      {
26      }
27  
28      /**
29       * Sets the file sets base directory.
30       */
31      public void setDirectory( @Nonnull File directory )
32      {
33          this.directory = directory;
34      }
35  
36      @Nonnull public File getDirectory()
37      {
38          return directory;
39      }
40  
41      public static DefaultFileSet fileSet( File directory )
42      {
43          final DefaultFileSet defaultFileSet = new DefaultFileSet( directory );
44          return defaultFileSet;
45      }
46  
47  }