View Javadoc

1   /**
2    * Copyright 2009, Frederic Bregier, and individual contributors by the @author
3    * tags. See the COPYRIGHT.txt in the distribution for a full listing of
4    * individual contributors.
5    *
6    * This is free software; you can redistribute it and/or modify it under the
7    * terms of the GNU Lesser General Public License as published by the Free
8    * Software Foundation; either version 3.0 of the License, or (at your option)
9    * any later version.
10   *
11   * This software is distributed in the hope that it will be useful, but WITHOUT
12   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14   * details.
15   *
16   * You should have received a copy of the GNU Lesser General Public License
17   * along with this software; if not, write to the Free Software Foundation,
18   * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
19   * site: http://www.fsf.org.
20   */
21  package goldengate.ftp.exec.file;
22  
23  import goldengate.common.command.exception.CommandAbstractException;
24  import goldengate.ftp.core.file.FtpFile;
25  import goldengate.ftp.core.session.FtpSession;
26  import goldengate.ftp.filesystembased.FilesystemBasedFtpDir;
27  
28  /**
29   * FtpFile implementation based on true directories and files
30   *
31   * @author Frederic Bregier
32   *
33   */
34  public class FileBasedDir extends FilesystemBasedFtpDir {
35      /**
36       * @param session
37       */
38      public FileBasedDir(FtpSession session) {
39          super(session);
40      }
41  
42      public FtpFile newFile(String path, boolean append)
43              throws CommandAbstractException {
44          return new FileBasedFile((FtpSession) getSession(), this, path, append);
45      }
46  }