开发者

Read static content from within the code of an application

开发者 https://www.devze.com 2023-01-20 11:46 出处:网络
Is there a way to read the contents of a static data directory or interact with that data in any way from within the code of a开发者_开发技巧n application?

Is there a way to read the contents of a static data directory or interact with that data in any way from within the code of a开发者_开发技巧n application?

Edit: Please excuse me if it wasn't clear at first, I mean getting a list of the files in that directory, not reading the data in them.


No. Files marked as static in app.yaml are not available to your application; they're served from separate servers.

If you just need to list them, you could build a list as part of your deploy process. If you need to actually read them, you'll need to include a second copy in your application directory (although the "copy" can be just a symlink; appcfg.py will follow symlinks and upload them.)


You can just open them (only read only).

0

精彩评论

暂无评论...
验证码 换一张
取 消