Package es.juanrak.svn.util.jna

Examples of es.juanrak.svn.util.jna.Shell32$SHFILEOPSTRUCT


        public boolean hasTrash() { return true; }

        public boolean moveToTrash(File[] files) {
            Shell32 shell = Shell32.INSTANCE;
            SHFILEOPSTRUCT fileop = new SHFILEOPSTRUCT();
            fileop.wFunc = Shell32.FO_DELETE;
            String[] paths = new String[files.length];
            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;
        }
View Full Code Here


        public boolean hasTrash() { return true; }

        public void moveToTrash(File[] files) throws IOException {
            Shell32 shell = Shell32.INSTANCE;
            SHFILEOPSTRUCT fileop = new SHFILEOPSTRUCT();
            fileop.wFunc = Shell32.FO_DELETE;
            String[] paths = new String[files.length];
            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);
            }
View Full Code Here

         * @param ficheroRecibo
         *            Fichero a editar.
         * @return Proceso asociado a la aplicacion lanzada.
         */
        public int editar(File ficheroRecibo) throws Exception {
            Shell32 shell32Instancia = Shell32.INSTANCE;

            return shell32Instancia.ShellExecute(null, "open", ficheroRecibo.getAbsolutePath(), null, null, Shell32.SW_SHOWMAXIMIZED);
        }
View Full Code Here

         * @param ficheroRecibo
         *            Fichero a imprimir.
         * @return Proceso asociado a la aplicacion lanzada.
         */
        public int imprimir(File ficheroRecibo) throws Exception {
            Shell32 shell32Instancia = Shell32.INSTANCE;

            return shell32Instancia.ShellExecute(null, "print", ficheroRecibo.getAbsolutePath(), null, null, Shell32.SW_HIDE);
        }
View Full Code Here

TOP

Related Classes of es.juanrak.svn.util.jna.Shell32$SHFILEOPSTRUCT

Copyright © 2018 www.massapicom. 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.