Giter Club home page Giter Club logo

ftp-fs's People

Contributors

joehni avatar robtimus avatar tan9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ftp-fs's Issues

Server Reply: SSH-2.0-OpenSSH_7.4

Thank you for sharing your work, it really helps me

I meet some problem when i try to connect my server by ftps, it returns:

org.apache.commons.net.MalformedServerReplyException: Could not parse response code. Server Reply: SSH-2.0-OpenSSH_7.4

Here is my code:

public void syncImages() throws URISyntaxException, IOException { 
        FTPSEnvironment env = new FTPSEnvironment()
                .withCredentials("root", "123456".toCharArray());
        FileSystem server = FileSystems.newFileSystem(URI.create("ftps://10.146.168.39"), env);
        Path path = server.getPath("/data/app/mobile-materials/public/img/");
        int a = 1;
    }

How can i solve this problem?

Thank you

Listing directories not working with FileZilla server

When I try to list directory contents stored on a FileZilla server, I always get a java.nio.file.NotDirectoryException. This seems to come from the fact that FileZilla doesn't emit . when using the LIST command.

checkstyle-plugin complains about line length in generated file

Without an explicit clean, checkstyle complains about a generated file in the target directory:

$ mvn validate
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO]   ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO] 
[INFO] ---------------------< com.github.robtimus:ftp-fs >---------------------
[INFO] Building ftp-fs 2.2-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-checkstyle-plugin:3.1.1:check (default) @ ftp-fs ---
[INFO] Starting audit...
[WARN] /home/jse/work/3rdParty/ftp-fs/target/classes/com/github/robtimus/filesystems/ftp/fs.properties:4: Line is longer than 150 characters (found 263). [LineLength]
Audit done.
[WARNING] target/classes/com/github/robtimus/filesystems/ftp/fs.properties:[4] (sizes) LineLength: Line is longer than 150 characters (found 263).
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.030 s
[INFO] Finished at: 2020-11-20T13:08:37+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.1.1:check (default) on project ftp-fs: You have 1 Checkstyle violation. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Build project first to reproduce this. Users will run into it when they generate an Eclipse project after an successful build.

unused FTPLogger class

Hello

I noticed that the FTPLogger class is never used.
the only reference is in FTPClientPool and this is just the call to createLogger that just encapsulates LoggerFactory.getLooger of SLf4J.
I do not understand the presence of this class.

A+JYT

Allow Configurable FTPEnvironment.setListHiddenFiles()?

First of all, I am very impressed with your implementation! Thank you for sharing your work!

Curious if you have any thoughts on this...

I was experimenting with ftp-fs with a python FTP server pyftpdlib.

Files.list(fs.getPath("dir1")) threw an exception, although the directory did exist. Upon debugging I learned that for some reason (I have not determined exactly) pyftpdlib does not support FTP command LIST with option -a. Apparently this is controlled by FTPClient#setListHiddenFiles(true/false).

I did find a workaround:
I manually subclassed FTPEnvironment to instead call client.setListHiddenFiles(true). The Files.list(...) invocation worked.

I don't see an explicit comment in the FTPEnvironment#initializePreConnect() method on indicating why we need to setListHiddenFiles(true) at this point, but I presume it is intended to set that property in case a user wishes to access hidden files. Have you considered if this setting should be configurable somehow (other than subclassing) since it is not part of the FTPClientConfig object?

https://github.com/robtimus/ftp-fs/blob/master/src/main/java/com/github/robtimus/filesystems/ftp/FTPEnvironment.java#L762

 void initializePreConnect(FTPClient client) throws IOException {
        client.setListHiddenFiles(true);  // not all FTP clients appear to support this

        if (containsKey(SEND_BUFFER_SIZE)) {
            int size = FileSystemProviderSupport.getIntValue(this, SEND_BUFFER_SIZE);
            client.setSendBufferSize(size);
        }
        ....

build broken

  1. git clone https://github.com/robtimus/ftp-fs.git
  2. cd ftp-fs
  3. mvn clean install

Expected: build completes without errors
Actual:

Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.6.0:jar (default) on project ftp-fs: MavenReportException: Error while generating Javadoc: 
Exit code: 2
error: No source files for package com.github.robtimus.filesystems.ftp

PS: same thing for sftp-fs

java.lang.IllegalArgumentException: URI has a path component

Hi. I'm quite new to FTP in general, so I might be missing something obvious here!

I'm just trying out your library, and attempting to connect to ftp://speedtest.tele2.net/, which is a public ftp "test server". But I get an exception:

java.lang.IllegalArgumentException: URI has a path component: ftp://speedtest.tele2.net/
	at com.github.robtimus.filesystems.Messages$URIMessages.hasPath(Messages.java:714)
	at com.github.robtimus.filesystems.ftp.FTPFileSystemProvider.checkURI(FTPFileSystemProvider.java:168)
	at com.github.robtimus.filesystems.ftp.FTPFileSystemProvider.newFileSystem(FTPFileSystemProvider.java:89)
	at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:344)
	at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:293)

How would I go on resolving this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.