Skip to content
Simple client for Ftp/Ftps/Sftp
Scala
Branch: master
Clone or download
Regis Leray
Latest commit a71717e Oct 20, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ftp-home first commit Sep 27, 2019
project support scala 2.13 Oct 9, 2019
src Use Safe Resource Oct 20, 2019
.gitignore first commit Sep 27, 2019
.travis.yml support scala 2.13 Oct 9, 2019
LICENSE update readme + license Sep 28, 2019
README.md Use Safe Resource Oct 20, 2019
build.sbt support scala 2.13 Oct 9, 2019
docker-compose.yml first commit Sep 27, 2019
version.sbt Setting version to 0.4.1-SNAPSHOT Oct 20, 2019

README.md

FS2 with SFTP - FTP / FTPS

fs2 ftp client built on top of Cats Effect, Fs2 and the sftp java client sshj and ftp/ftps client commons-net

Build Status codecov Maven Central Cats friendly

Setup

//support scala 2.11 /  2.12 / 2.13

libraryDependencies += "com.github.regis-leray" %% "fs2-ftp" % "0.4.0"

How to use it ?

  • FTP / FTPS
import ray.fs2.ftp.Ftp._

// FTP
val settings = FtpSettings("127.0.0.1", 21, credentials("foo", "bar"))
// FTPS
val settings = FtpsSettings("127.0.0.1", 21, credentials("foo", "bar"))

connect[IO](settings).use{
  listFiles[IO]("/")(_).compile.toList
}
  • SFTP
import ray.fs2.ftp.SFtp._
import net.schmizz.sshj.{DefaultConfig, SSHClient}

implicit val sshClient: SSHClient = new SSHClient(new DefaultConfig)
val settings = SFtpSettings("127.0.0.1", 22, credentials("foo", "bar"))

connect[IO](settings).use(
  listFiles[IO]("/")(_).compile.toList
)     

LICENSE

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

You can’t perform that action at this time.