View Javadoc

1   /**
2      This file is part of GoldenGate Project (named also GoldenGate or GG).
3   
4      Copyright 2009, Frederic Bregier, and individual contributors by the @author
5      tags. See the COPYRIGHT.txt in the distribution for a full listing of
6      individual contributors.
7   
8      All GoldenGate Project is free software: you can redistribute it and/or 
9      modify it under the terms of the GNU General Public License as published 
10     by the Free Software Foundation, either version 3 of the License, or
11     (at your option) any later version.
12  
13     GoldenGate is distributed in the hope that it will be useful,
14     but WITHOUT ANY WARRANTY; without even the implied warranty of
15     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16     GNU General Public License for more details.
17  
18     You should have received a copy of the GNU General Public License
19     along with GoldenGate .  If not, see <http://www.gnu.org/licenses/>.
20   */
21  package goldengate.ftp.core.file;
22  
23  import goldengate.common.command.exception.CommandAbstractException;
24  import goldengate.common.file.DirInterface;
25  
26  /**
27   * @author Frederic Bregier
28   *
29   */
30  public interface FtpDir extends DirInterface {
31      /**
32       * Create a new FtpFile
33       *
34       * @param path
35       * @param append
36       * @return the new Ftp FileInterface
37       * @throws CommandAbstractException
38       */
39      public abstract FtpFile newFile(String path, boolean append)
40              throws CommandAbstractException;
41  
42      /**
43       * Set a path as the current FileInterface
44       *
45       * @param path
46       * @param append
47       *            True if this file is supposed to be in append mode (APPE),
48       *            False in any other cases
49       * @return the Ftp FileInterface if it is correctly initiate
50       * @throws CommandAbstractException
51       */
52      public abstract FtpFile setFile(String path, boolean append)
53              throws CommandAbstractException;
54  
55      /**
56       * Set a new unique path as the current FileInterface from the current
57       * Directory (STOU)
58       *
59       * @return the Ftp FileInterface if it is correctly initiate
60       * @throws CommandAbstractException
61       */
62      public abstract FtpFile setUniqueFile()
63              throws CommandAbstractException;
64  
65  }