简体   繁体   English

从本地驱动器获取文件和文件夹的名称

[英]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? 还是没有服务器,这是完全不可能的?

没有本地服务器或本地可执行文件,这是不可能的,因为导航器在“沙盒”中运行...

JavaScript doesn't have access to the local filesystem from the browser JavaScript无法从浏览器访问本地文件系统

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. 从技术上讲,如果不通过浏览器上传文件,则无法从用户计算机读取文件。

But there are some ways around that 但是有一些解决方法

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.

相关问题 jQuery加载并处理本地硬盘 - jquery load and working off local hard drive 文件系统,用于管理用户的本地文件夹和文件 - File System to manage local folders and files of users Google Picker Api JS显示没有文件夹的驱动器文件 - Google Picker Api JS Showing Drive files without folders 创建单个文件/文件夹并立即使用它们的 ID? (谷歌云端硬盘 API) - Created individual files/folders and immediately use their Ids? (Google Drive API) NodeJs Glob 不在 Windows 上的驱动器磁盘中显示文件/文件夹 - NodeJs Glob dont show files/folders in Drive Disk on Windows Google Drive API中父文件夹下的文件和文件夹列表 - List of files and folders under a parent folder from Google Drive API 将谷歌表单文件上传到两个不同的谷歌驱动器文件夹 - Upload google form files to two different google drive folders Google Drive Picker API - 显示文件夹和某些 mime 类型的文件 - Google Drive Picker API - Show folders and certain mime types files Firefox运行缓慢,JavaScript在硬盘驱动器上运行,而不是上传文件 - Firefox slow with javascript running off the hard-drive, not with uploaded files Google云端硬盘:使用javascript API获取(根)文件和文件夹(仅获取云端硬盘上已删除的文件) - Google drive: Get (root) file and folders with javascript api (get only deleted files on drive)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM