FTP 文件触发器

发布于 2024-09-26 11:36:44 字数 186 浏览 1 评论 0原文

目前我有一个处理文件的应用程序。我的工作流程是:

  1. 有人将文件放入 FTP 中,并通知我
  2. 下载该文件并使用该文件运行我的应用程序。它返回一个已处理的文件。
  3. 我再次将结果存入FTP并通知我的同事。

当有人将文件放入 FTP 时,是否有任何类型的触发器可以执行我的代码?

At this moment I have an application that processes a file. My workflow is:

  1. Someone puts a file in a FTP and notifies me
  2. I download the file and run my app with that file. It returns a proccessed file.
  3. I put the result in the FTP again and notify my workmate.

Is there any kind of trigger that executes my code when someone drops a file in the FTP?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

娜些时光,永不杰束 2024-10-03 11:36:44

您最好监视目标文件夹中的新文件并从中触发执行。如何实现这一点完全取决于您的应用程序所使用的语言或框架。

即 FileSystemWatcher (c#)

You'd be best served monitoring the destination folder for new files and triggering the execution from that. How you go about that would depend entirely on the language or framework your application is written in.

i.e. FileSystemWatcher (c#)

晨曦慕雪 2024-10-03 11:36:44

是的,这完全取决于 FTP 服务器和平台。有一些 FTP 服务器可以执行此操作。其他人则不然,但您可以使用 inotify() 来观察目录的更改。 (在 UNIX 上。)

Yes, it totally depends on the FTP server and platform. There are FTP servers which do this. Others do not, but you could watch a directory for changes with inotify(). (On UNIX.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文