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