简体   繁体   English

如何使用angularJS将共享文件夹文件复制到本地计算机

[英]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.

相关问题 如何使用jdbc将包源从数据库复制到本地计算机? - how I can copy the package source from database to my local machine using jdbc? 如何将.jar中的文件复制到本地FS中 - How can i copy Files from .jar into local FS 将文件从Android的Gdx.files.local()文件夹复制到开发计算机 - Copy files from Android's Gdx.files.local() folder to developing machine 使用Apache FileUtils从共享源文件夹到本地目标文件夹的文件复制失败 - File copy from shared source folder to local destination folder using Apache FileUtils failed 使用 RCP 或 FTP 将文件从远程 unix 机器复制到本地 windows 机器上 - Using RCP or FTP to copy files from a remote unix machine onto a local windows machine 使用Java将文件从本地窗口机器复制到远程Windows机器 - Copy files from local window machine to remote windows machine using java 使用身份验证将文件复制到Java中的本地网络中的计算机上 - copy files to a machine in local network in java with authentification 如何确定将大量文件复制到外部共享文件夹的并行Java线程的理想数量? - How can I determine the ideal number of parallel java threads for copying a large set of files to an external shared folder? 使用JSP Applet在客户端计算机中复制文件夹 - Copy folder in client machine using jsp applet Java:如何使用凭据从网络复制到本地文件夹 - Java: How to copy from network using credentials to local folder
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM