Azure Webjob-访问本地文件系统 [英] Azure Webjob - accessing local file system

查看:93
本文介绍了Azure Webjob-访问本地文件系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个旧版exe,它可以获取本地计算机文件路径,对其进行处理,然后再次在本地路径中生成输出文件.可以在Azure Webjob上运行吗?

I have a legacy exe which takes local machine file path, processes it and produces output file in again the local path. Can this be run on Azure Webjob?

我当时正在考虑编写一个包装exe文件,该文件将从blob存储中下载文件->将其存储在本地文件系统中->使用本地文件路径调用旧版exe->获取输出并将其再次上传到blob.

I was thinking to write a wrapper exe which downloads file from blob storage -> store it in local file system -> call the legacy exe with local file path -> get the output and upload it to the blob again.

这种方法行得通还是存在局限性?

Will this approach work or there are limitations?

推荐答案

只要您将要传递的文件夹传递给该exe,该exe就应该可以正常运行.在进入WebJobs之前,建议您使用 Kudu控制台在Web应用程序中对其进行手动测试. ,以确保其运行正常.

Such exe should run fine, as long as you get to pass it the folders to write from/to. Before getting into WebJobs, I suggest testing it manually in a Web App using Kudu Console, to make sure it runs fine.

然后,如果您的目标是使其与Blob输入/输出一起工作,则包装exe应该可以工作.显然,直接将它与博客流一起使用会更清洁,但是如果遗留exe是给定的并且不能更改,则包装方法应该没问题.

Then if your goal is to have it work with blob input/output, the wrapper exe should work. Obviously, it'd be cleaner to have it directly work with blog streams, but if the legacy exe is a given and can't be changed, the wrapper approach should be fine.

这篇关于Azure Webjob-访问本地文件系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆