xfileutil.java
来自「JavaExplorer是一个独立于平台的浏览器」· Java 代码 · 共 94 行
JAVA
94 行
/** * File and FTP Explorer * Copyright 2003 * BOESCH Vincent * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */package javaexplorer.util;import java.io.*;import java.util.zip.*;import javaexplorer.Launcher;import javaexplorer.gui.dialog.*;import javaexplorer.io.copy.CopyAction;import javaexplorer.io.copy.CopyActionGroup;import javaexplorer.io.copy.CopyModel;import javaexplorer.manager.file.*;import javaexplorer.manager.ftp.*;import javaexplorer.manager.zip.*;import javaexplorer.model.*;import javaexplorer.ressource.*;import javaexplorer.util.filter.ImageFilter;import javaexplorer.util.ftp.Ftp;import javaexplorer.util.options.Options;import java.awt.Color;/** * Ensemble de m閠hodes statiques utilis閑s * par les diff閞entes impl閙entations disponibles * de l'interface XFile * * <p>Title: JExp</p> * <p>Description: File, FTP Explorer</p> * <p>Copyright: 2003</p> * <p>Company: N/A</p> * @author BOESCH Vincent * @version 4.4 */public class XFileUtil { public final static Color COLOR_READ_ONLY = Color.BLUE; public final static Color COLOR_WRITE_ONLY = Color.ORANGE; public final static Color COLOR_NO_READ_WRITE = Color.RED; public final static Color COLOR_READ_WRITE = Color.BLACK; public static Color getXFileColor(XFile xf){ if( xf.canRead()){ if( xf.canWrite()){ return COLOR_READ_WRITE; } else{ return COLOR_READ_ONLY; } } else{ return (xf.canWrite() ? COLOR_WRITE_ONLY:COLOR_NO_READ_WRITE); } } /** *@param xDirToCreate Description of * the Parameter */ public static void createRecurseDirectories(XFile xDirToCreate) { if (xDirToCreate == null) { return; } if (xDirToCreate.exists()) { return; } XFile parent = xDirToCreate.getXParent(); if (parent == null) { //On est
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?