0
I have a folder on a server, accessible via FTP. I would like to know a form in NODEJS where passing the file name, it returns me if the file exists or not. I found an implementation in DELPHI - code
0
I have a folder on a server, accessible via FTP. I would like to know a form in NODEJS where passing the file name, it returns me if the file exists or not. I found an implementation in DELPHI - code
Browser other questions tagged node.js ftp
You are not signed in. Login or sign up in order to post.
There are several FTP Client modules for Node.js. What you can do is implement some, try to give a Get in the file you want and the return will indicate whether it exists or not.
– Leandro Angelo
The problem I found was two: if you use a list, the folder is large and can break the parser, bringing inconsistency. If I implement the code and ask for the file, the system already starts the download. So my idea was to find out if there is any paramentro, either ftp or Curl where I passing the name it return me a 200 or 404...
– Israel Zebulon
Include in your question the code you have already developed and tell which Node module you are using for the FTP client. 200 or 404 are protocol status
HTTP
, I’m not sure if the codes fromFTP
are the same.– Leandro Angelo
I just found a code in PHP http://codigosnaweb.com/forum/Verificar-se-um-arquivo-existe-em-um-servidor-remoto-curl-PHP_1_10027.html . I noticed that the development used a function to return the answer code. I think it may be a path...
– Israel Zebulon