[英]Fetch names of files and and folders off a local drive
I am building a website to manage my Videos and TV shows. 我正在建立一个网站来管理我的视频和电视节目。 I want to do this without a local server. 我想在没有本地服务器的情况下执行此操作。 That is kind of a problem, because I can't use Technologies like AJAX and PHP. 那是一个问题,因为我不能使用AJAX和PHP之类的技术。
My problem is that I want a my site to scan for the files on my local drive. 我的问题是我希望我的站点扫描本地驱动器上的文件。 I want to read my local files, not the ones on the server. 我想读取我的本地文件,而不是服务器上的文件。 Is that even possible? 那有可能吗? Or does my computer block this kind of functions? 还是我的计算机阻止了此类功能? In order to protect the my privacy? 为了保护我的隐私?
I'd be glad if someone could tell me which programming language could handle that kind of stuff. 如果有人可以告诉我哪种编程语言可以处理这种事情,我将感到非常高兴。 Or weather it is completely impossible without a server? 还是没有服务器,这是完全不可能的?
没有本地服务器或本地可执行文件,这是不可能的,因为导航器在“沙盒”中运行...
This is mostly due to security limitations. 这主要是由于安全限制。 In a browser environment, you're limited to accessing the current window and core browser features through some predefined APIs, but that's about it. 在浏览器环境中,您仅限于通过一些预定义的API访问当前窗口和核心浏览器功能,仅此而已。 You can't technically read a file from the user's machine without it being uploaded through the browser. 从技术上讲,如果不通过浏览器上传文件,则无法从用户计算机读取文件。
If you already know enough HTML and JS to build a webapp, you could look into learning node.js and its desktop shell, Electron . 如果您已经了解足够的HTML和JS来构建webapp,则可以考虑学习node.js及其桌面外壳Electron 。 It's the same technologies you would use on the web within a container and with bindings to the node.js APIs like file system reads and writes. 这与您在容器中的Web上使用的技术相同,并且具有对node.js API(例如文件系统读写)的绑定。 It's a huge ecosystem to wrap your head around, but there are loads of documentation and tutorials online, and it's a great way to build desktop apps with the languages and tools you're already familiar with. 这是一个庞大的生态系统,您可以动脑筋,但是在线上有大量的文档和教程,这是一种使用您已经熟悉的语言和工具构建桌面应用程序的好方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.