2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.ftpupload.internal.ftp;
15 import org.apache.ftpserver.ftplet.FileSystemView;
16 import org.apache.ftpserver.ftplet.FtpException;
17 import org.apache.ftpserver.ftplet.FtpFile;
18 import org.slf4j.Logger;
19 import org.slf4j.LoggerFactory;
22 * Simple FTP file system view implementation.
25 * @author Pauli Anttila - Initial contribution
27 public class SimpleFileSystemView implements FileSystemView {
28 private Logger logger = LoggerFactory.getLogger(SimpleFileSystemView.class);
30 SimpleFtpFile file = new SimpleFtpFile();
33 public boolean changeWorkingDirectory(String arg0) throws FtpException {
34 logger.trace("changeWorkingDirectory: {}", arg0);
39 public void dispose() {
40 logger.trace("dispose");
44 public FtpFile getFile(String arg0) throws FtpException {
45 logger.trace("getFile: {}", arg0);
50 public FtpFile getHomeDirectory() throws FtpException {
51 logger.trace("getHomeDirectory");
52 return new SimpleFtpFile();
56 public FtpFile getWorkingDirectory() throws FtpException {
57 logger.trace("getWorkingDirectory");
58 return new SimpleFtpFile();
62 public boolean isRandomAccessible() throws FtpException {
63 logger.trace("isRandomAccessible");