[英]How can i copy shared folder files into local machine using angularJS
I have created a tool in swing(JAVA) by using which i am copying files from shared location into a local system. 我已经创建了一个swing(JAVA)工具,通过该工具我可以将文件从共享位置复制到本地系统中。 I wan't to do the same in AngularJS is there any way by which i can copy files from one location to another.
我不会在AngularJS中做同样的事情,有什么方法可以将文件从一个位置复制到另一个位置。 The shared folder location and local machine location is provided by user.
共享文件夹位置和本地计算机位置由用户提供。 I just have to fetch location's from textfield and perform copy paste operation.
我只需要从文本字段中获取位置并执行复制粘贴操作即可。
CODE what i have written in swing: ` 编码我已经写过的东西:
void copyPaste(String l,String m )
{
File srcDir = new File(l);
File destDir = new File(m);
try {
FileUtils.copyDirectory(srcDir, destDir);
} catch (IOException e) {
JOptionPane.showMessageDialog(null, e);
System.exit(1);
}
}`
How can i do the same in AngularJS 我如何在AngularJS中做同样的事情
Javascript doesn't support client side file manipulation for security reasons. 出于安全原因,JavaScript不支持客户端文件操作。
the File and Directory Entries API is non standard and allow you to manipulate a sandoboxed file system (you cannot write file to an arbitrary folder) File and Directory Entries API是非标准的,并且允许您操纵沙盒文件系统(您不能将文件写入任意文件夹)
If you want to stick to javascript you can replicate that code on the server side with NodeJS (eg this module) 如果您想坚持使用JavaScript,则可以使用NodeJS在服务器端复制该代码(例如, 此模块)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.