understand basic-ftp module in node

understand basic-ftp module in node

Search for: understand basic-ftp module in node

Here is the documentation for it


const ftp = require("basic-ftp")
const fs = require("fs")
 
example()
 
async function example() {
    const client = new ftp.Client()
    client.ftp.verbose = true
    try {
        await client.access({
            host: "myftpserver.com",
            user: "very",
            password: "password",
            secure: true
        })
        console.log(await client.list())
        await client.upload(fs.createReadStream("README.md"), "README.md")
    }
    catch(err) {
        console.log(err)
    }
    client.close()
}

On the same link API is here


//From any directory
npm -i -g basic-ftp

//it placed it under
node-home/node/node_modules/basic-ftp

Can basic-ftp module list files that have changed from a particular date?

Search for: Can basic-ftp module list files that have changed from a particular date?

I was told most ftp sites don't have that feature


ls [-lafhlnrSt] path

//what ever those options are

How do I specify listing and ls options with basic-ftp npm module?

Search for: How do I specify listing and ls options with basic-ftp npm module?

Here is npm community forum. Not sure what gets asked here

Here is basic-ftp github location