Examples of SHFileOperation()


Examples of com.sun.jna.examples.win32.Shell32.SHFileOperation()

            for (int i=0;i < paths.length;i++) {
                paths[i] = files[i].getAbsolutePath();
            }
            fileop.pFrom = fileop.encodePaths(paths);
            fileop.fFlags = Shell32.FOF_ALLOWUNDO|Shell32.FOF_NOCONFIRMATION|Shell32.FOF_SILENT;
            return shell.SHFileOperation(fileop) == 0;
        }
    }

    private static class MacFileUtils extends FileUtils {
View Full Code Here

Examples of com.sun.jna.examples.win32.Shell32.SHFileOperation()

            for (int i=0;i < paths.length;i++) {
                paths[i] = files[i].getAbsolutePath();
            }
            fileop.pFrom = fileop.encodePaths(paths);
            fileop.fFlags = Shell32.FOF_ALLOWUNDO|Shell32.FOF_NOCONFIRMATION|Shell32.FOF_SILENT;
            int ret = shell.SHFileOperation(fileop);
            if (ret != 0) {
                throw new IOException("Move to trash failed: " + ret);
            }
            if (fileop.fAnyOperationsAborted) {
                throw new IOException("Move to trash aborted");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.