15 lines
356 B
JavaScript
15 lines
356 B
JavaScript
|
const {FtpSrv, FileSystem} = require('ftp-srv');
|
||
|
|
||
|
class MyFileSystem extends FileSystem {
|
||
|
constructor(connection, { root, cwd } = {}) {
|
||
|
super(connection, root, cwd);
|
||
|
}
|
||
|
list(path){
|
||
|
return [{name:'test',isDirectory:"false"}]
|
||
|
}
|
||
|
get(fileName) {
|
||
|
console.log(fileName)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = {FtpSrv,MyFileSystem};
|