19 package org.turro.file.zul;
22 import java.io.IOException;
23 import java.util.logging.Level;
24 import java.util.logging.Logger;
25 import org.apache.commons.io.FileUtils;
26 import org.turro.elephant.context.ElephantContext;
27 import org.turro.elephant.util.Messages;
28 import org.turro.zul.frame.Framework;
36 public static void paste(File folder) {
47 public static void cutFile(String name,
final File value) {
54 private static void pasteFile(File folder) {
64 FileUtils.moveFile(file,
new File(folder.getAbsolutePath() +
"/" + file.getName()));
66 FileUtils.copyFile(file,
new File(folder.getAbsolutePath() +
"/" + file.getName()));
68 }
catch (IOException ex) {
69 Logger.getLogger(FileClipboard.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
79 public static void cutFolder(String name,
final File value) {
86 private static void pasteFolder(File folder) {
96 FileUtils.moveDirectory(origin, folder);
98 FileUtils.copyDirectory(origin, folder);
100 }
catch (IOException ex) {
101 Logger.getLogger(FileClipboard.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
static Messages confirmCutting()
Messages add(String word)
static void copyFolder(File value)
static void paste(File folder)
static boolean hasClipboard()
static void cutFile(String name, final File value)
static void clearClipboard()
static void cutFolder(String name, final File value)
static void copyFile(File value)
static FrameClipboard getClipboard()