亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? file.java

?? linux下編程用 編譯軟件
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/* File.java -- Class representing a file on disk   Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005   Free Software Foundation, Inc.This file is part of GNU Classpath.GNU Classpath is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2, or (at your option)any later version. GNU Classpath is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNUGeneral Public License for more details.You should have received a copy of the GNU General Public Licensealong with GNU Classpath; see the file COPYING.  If not, write to theFree Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA02110-1301 USA.Linking this library statically or dynamically with other modules ismaking a combined work based on this library.  Thus, the terms andconditions of the GNU General Public License cover the wholecombination.As a special exception, the copyright holders of this library give youpermission to link this library with independent modules to produce anexecutable, regardless of the license terms of these independentmodules, and to copy and distribute the resulting executable underterms of your choice, provided that you also meet, for each linkedindependent module, the terms and conditions of the license of thatmodule.  An independent module is a module which is not derived fromor based on this library.  If you modify this library, you may extendthis exception to your version of the library, but you are notobligated to do so.  If you do not wish to do so, delete thisexception statement from your version. */package java.io;import gnu.classpath.SystemProperties;import java.net.MalformedURLException;import java.net.URI;import java.net.URISyntaxException;import java.net.URL;/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 * "The Java Language Specification", ISBN 0-201-63451-1 * Status:  Complete to version 1.3. *//** * This class represents a file or directory on a local disk.  It provides * facilities for dealing with a variety of systems that use various * types of path separators ("/" versus "\", for example).  It also * contains method useful for creating and deleting files and directories. * * @author Aaron M. Renn (arenn@urbanophile.com) * @author Tom Tromey (tromey@cygnus.com) */public class File implements Serializable, Comparable{  private static final long serialVersionUID = 301077366599181567L;  /**   * This is the path separator string for the current host. This field   * contains the value of the <code>file.separator</code> system property.   * An example separator string would be "/" on the GNU system.   */  public static final String separator = SystemProperties.getProperty("file.separator");  private static final String dupSeparator = separator + separator;  /**   * This is the first character of the file separator string.  On many   * hosts (for example, on the GNU system), this represents the entire    * separator string.  The complete separator string is obtained from the   * <code>file.separator</code>system property.   */  public static final char separatorChar = separator.charAt(0);    /**   * This is the string that is used to separate the host name from the   * path name in paths than include the host name.  It is the value of   * the <code>path.separator</code> system property.   */  public static final String pathSeparator    = SystemProperties.getProperty("path.separator");    /**   * This is the first character of the string used to separate the host name   * from the path name in paths that include a host.  The separator string   * is taken from the <code>path.separator</code> system property.   */  public static final char pathSeparatorChar = pathSeparator.charAt(0);  /**   * This is the path to the file set when the object is created.  It   * may be an absolute or relative path name.   */  private String path;      /**   * The time (millisecond), when the last temporary file was created.   */  private static long last_tmp;    /**   * The number of files, created during the current millisecond.   */  private static int n_created;    /**   * This method tests whether or not the current thread is allowed to   * to read the file pointed to by this object.  This will be true if and   * and only if 1) the file exists and 2) the <code>SecurityManager</code>   * (if any) allows access to the file via it's <code>checkRead</code>   * method 3) the file is readable.   *   * @return <code>true</code> if reading is allowed,    * <code>false</code> otherwise   *   * @exception SecurityException If the <code>SecurityManager</code>    * does not allow access to the file   */  public boolean canRead()  {    // Test for existence. This also does the SecurityManager check    if (!exists())      return false;    return VMFile.canRead(path);  }  /**   * This method test whether or not the current thread is allowed to   * write to this object.  This will be true if and only if 1) The   * <code>SecurityManager</code> (if any) allows write access to the   * file and 2) The file exists and 3) The file is writable.  To determine   * whether or not a non-existent file can be created, check the parent   * directory for write access.   *   * @return <code>true</code> if writing is allowed, <code>false</code>    * otherwise   *   * @exception SecurityException If the <code>SecurityManager</code>    * does not allow access to the file   */  public boolean canWrite()  {    // First do a SecurityCheck before doing anything else.    checkWrite();         // Test for existence.  This is required by the spec    if (! VMFile.exists(path))      return false;    if (VMFile.isDirectory(path))      return VMFile.canWriteDirectory(this);    else      return VMFile.canWrite(path);  }  /**   * This method creates a new file of zero length with the same name as   * the path of this <code>File</code> object if an only if that file   * does not already exist.   * <p>   * A <code>SecurityManager.checkWrite</code> check is done prior   * to performing this action.   *   * @return <code>true</code> if the file was created, <code>false</code> if   * the file alread existed.   *   * @exception IOException If an I/O error occurs   * @exception SecurityException If the <code>SecurityManager</code> will   * not allow this operation to be performed.   *   * @since 1.2   */  public boolean createNewFile() throws IOException  {    checkWrite();    return VMFile.create(path);  }  /**   * This method deletes the file represented by this object.  If this file   * is a directory, it must be empty in order for the delete to succeed.   *   * @return <code>true</code> if the file was deleted, <code>false</code>    * otherwise   *   * @exception SecurityException If deleting of the file is not allowed   */  public synchronized boolean delete()  {    SecurityManager s = System.getSecurityManager();        if (s != null)      s.checkDelete(path);        return VMFile.delete(path);  }  /**   * This method tests two <code>File</code> objects for equality by    * comparing the path of the specified <code>File</code> against the path   * of this object.  The two objects are equal if an only if 1) The   * argument is not null 2) The argument is a <code>File</code> object and   * 3) The path of the <code>File</code>argument is equal to the path   * of this object.   * <p>   * The paths of the files are determined by calling the    * <code>getPath()</code>   * method on each object.   *   * @return <code>true</code> if the two objects are equal,    * <code>false</code> otherwise.   */  public boolean equals(Object obj)  {    if (! (obj instanceof File))      return false;        File other = (File) obj;    if (VMFile.IS_CASE_SENSITIVE)      return path.equals(other.path);    else      return path.equalsIgnoreCase(other.path);  }  /**   * This method tests whether or not the file represented by the object   * actually exists on the filesystem.   *   * @return <code>true</code> if the file exists, <code>false</code>otherwise.   *   * @exception SecurityException If reading of the file is not permitted   */  public boolean exists()  {    checkRead();    return VMFile.exists(path);  }  /**   * This method initializes a new <code>File</code> object to represent   * a file with the specified path.   *   * @param name The path name of the file   */  public File(String name)  {    path = normalizePath (name);  }   // Remove duplicate and redundant separator characters.  private String normalizePath(String p)  {    // On Windows, convert any '/' to '\'.  This appears to be the same logic    // that Sun's Win32 Java performs.    if (separatorChar == '\\')      {        p = p.replace ('/', '\\');	// We have to special case the "\c:" prefix.	if (p.length() > 2 && p.charAt(0) == '\\' &&	    ((p.charAt(1) >= 'a' && p.charAt(1) <= 'z') ||	    (p.charAt(1) >= 'A' && p.charAt(1) <= 'Z')) &&	    p.charAt(2) == ':')	  p = p.substring(1);      }    int dupIndex = p.indexOf(dupSeparator);    int plen = p.length();    // Special case: permit Windows UNC path prefix.    if (dupSeparator.equals("\\\\") && dupIndex == 0)      dupIndex = p.indexOf(dupSeparator, 1);    if (dupIndex == -1)      {        // Ignore trailing separator (though on Windows "a:\", for        // example, is a valid and minimal path).        if (plen > 1 && p.charAt (plen - 1) == separatorChar)	  {	    if (! (separatorChar == '\\' && plen == 3 && p.charAt (1) == ':'))	      return p.substring (0, plen - 1);	  }	else	  return p;      }        StringBuffer newpath = new StringBuffer(plen);    int last = 0;    while (dupIndex != -1)      {        newpath.append(p.substring(last, dupIndex));	// Ignore the duplicate path characters.	while (p.charAt(dupIndex) == separatorChar)	  {	    dupIndex++;	    if (dupIndex == plen)	      return newpath.toString();	  }	newpath.append(separatorChar);	last = dupIndex;	dupIndex = p.indexOf(dupSeparator, last);      }        // Again, ignore possible trailing separator (except special cases    // like "a:\" on Windows).    int end;    if (plen > 1 && p.charAt (plen - 1) == separatorChar)    {      if (separatorChar == '\\' && plen == 3 && p.charAt (1) == ':')        end = plen;      else        end = plen - 1;    }    else      end = plen;    newpath.append(p.substring(last, end));        return newpath.toString();  }   /**   * This method initializes a new <code>File</code> object to represent   * a file in the specified named directory.  The path name to the file   * will be the directory name plus the separator string plus the file   * name.  If the directory path name ends in the separator string, another   * separator string will still be appended.   *   * @param dirPath The path to the directory the file resides in   * @param name The name of the file   */  public File(String dirPath, String name)  {    if (name == null)      throw new NullPointerException();    if (dirPath != null)      {	if (dirPath.length() > 0)	  {	    // Try to be smart about the number of separator characters.	    if (dirPath.charAt(dirPath.length() - 1) == separatorChar		|| name.length() == 0)	      path = normalizePath(dirPath + name);	    else	      path = normalizePath(dirPath + separatorChar + name);	  }	else	  {	    // If dirPath is empty, use a system dependant	    // default prefix.	    // Note that the leading separators in name have	    // to be chopped off, to prevent them forming	    // a UNC prefix on Windows.	    if (separatorChar == '\\' /* TODO use ON_WINDOWS */)	      {		int skip = 0;		while(name.length() > skip		    && (name.charAt(skip) == separatorChar		    || name.charAt(skip) == '/'))		  {		    skip++;		  }		name = name.substring(skip);	      }	    path = normalizePath(separatorChar + name);	  }      }    else      path = normalizePath(name);  }  /**   * This method initializes a new <code>File</code> object to represent   * a file in the specified directory.  If the <code>directory</code>   * argument is <code>null</code>, the file is assumed to be in the   * current directory as specified by the <code>user.dir</code> system   * property   *   * @param directory The directory this file resides in   * @param name The name of the file   */  public File(File directory, String name)  {    this (directory == null ? null : directory.path, name);  }  /**   * This method initializes a new <code>File</code> object to represent   * a file corresponding to the specified <code>file:</code> protocol URI.   *   * @param uri The uri.   */  public File(URI uri)  {    if (uri == null)	throw new NullPointerException("uri is null");    if (!uri.getScheme().equals("file"))	throw new IllegalArgumentException("invalid uri protocol");    path = normalizePath(uri.getPath());  }  /**   * This method returns the path of this file as an absolute path name.   * If the path name is already absolute, then it is returned.  Otherwise   * the value returned is the current directory plus the separatory   * string plus the path of the file.  The current directory is determined   * from the <code>user.dir</code> system property.   *   * @return The absolute path of this file   */  public String getAbsolutePath()  {    if (isAbsolute())      return path;    else if (separatorChar == '\\'              && path.length() > 0 && path.charAt (0) == '\\')      {        // On Windows, even if the path starts with a '\\' it is not        // really absolute until we prefix the drive specifier from        // the current working directory to it.        return System.getProperty ("user.dir").substring (0, 2) + path;      }    else if (separatorChar == '\\'              && path.length() > 1 && path.charAt (1) == ':'             && ((path.charAt (0) >= 'a' && path.charAt (0) <= 'z')                 || (path.charAt (0) >= 'A' && path.charAt (0) <= 'Z')))      {        // On Windows, a process has a current working directory for        // each drive and a path like "G:foo\bar" would mean the         // absolute path "G:\wombat\foo\bar" if "\wombat" is the         // working directory on the G drive.        String drvDir = null;        try          {            drvDir = new File (path.substring (0, 2)).getCanonicalPath();          }        catch (IOException e)          {            drvDir = path.substring (0, 2) + "\\";          }                // Note: this would return "C:\\." for the path "C:.", if "\"        // is the working folder on the C drive, but this is         // consistent with what Sun's JRE 1.4.1.01 actually returns!        if (path.length() > 2)          return drvDir + '\\' + path.substring (2, path.length());        else          return drvDir;      }    else if (path.equals(""))      return System.getProperty ("user.dir");    else      return System.getProperty ("user.dir") + separatorChar + path;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩免费视频| 日本一区二区视频在线| 日韩欧美国产1| 国产亚洲成av人在线观看导航| 国产亚洲美州欧州综合国| 亚洲美女屁股眼交| 美女久久久精品| jvid福利写真一区二区三区| 欧美手机在线视频| 国产午夜三级一区二区三| www国产成人| 亚洲一区在线视频| 高清免费成人av| 91麻豆精品国产自产在线观看一区| 国产色产综合色产在线视频| 国产欧美一区二区在线| 亚洲不卡在线观看| 91在线视频官网| 欧美精品一区二区三区蜜桃| 三级久久三级久久久| 国产一二精品视频| 欧美精品国产精品| 国产清纯美女被跳蛋高潮一区二区久久w | 亚洲欧美韩国综合色| 成人一级视频在线观看| 久久久久久夜精品精品免费| 蜜桃av噜噜一区| 日韩欧美在线一区二区三区| 天堂在线亚洲视频| 91精品国产品国语在线不卡| 亚洲电影中文字幕在线观看| 91国产免费观看| 一区二区三区**美女毛片| 在线观看一区二区视频| 亚洲一区二区偷拍精品| 欧美高清你懂得| 麻豆国产精品一区二区三区| 精品国产乱码久久久久久牛牛| 精品制服美女丁香| 久久久噜噜噜久久人人看 | 欧美国产日产图区| 成人深夜福利app| 天堂成人国产精品一区| 欧美一区二区三区四区视频| 久久99国产精品久久99果冻传媒| 欧美不卡在线视频| 国产成人精品免费看| 椎名由奈av一区二区三区| 色婷婷久久综合| 日韩电影免费在线看| 久久婷婷综合激情| 99re在线精品| 日韩精品电影一区亚洲| www精品美女久久久tv| 成人免费高清在线| 亚洲在线中文字幕| 精品成人在线观看| 99久久国产免费看| 丝袜美腿亚洲色图| 国产嫩草影院久久久久| 色就色 综合激情| 久久精品久久精品| 中文字幕一区二区三区在线观看 | 日韩电影免费在线看| 精品国产百合女同互慰| 成人午夜精品在线| 亚洲午夜日本在线观看| 2023国产一二三区日本精品2022| 国产成人久久精品77777最新版本| 亚洲天堂精品视频| 日韩美女天天操| 91视视频在线观看入口直接观看www| 亚洲成人av免费| 国产农村妇女精品| 91精品国产综合久久精品麻豆| 国产精品456| 天天做天天摸天天爽国产一区| 久久九九全国免费| 欧美日韩精品一区二区三区| 成人综合在线观看| 日韩av不卡一区二区| 亚洲品质自拍视频网站| 精品少妇一区二区三区在线播放| 色香蕉久久蜜桃| 国产91富婆露脸刺激对白| 亚洲国产欧美一区二区三区丁香婷| 国产日产欧美一区二区三区| 91精品国产高清一区二区三区蜜臀| 成人免费看视频| 精品一区二区免费视频| 亚洲高清免费观看| 亚洲人xxxx| 亚洲天堂网中文字| 国产丝袜在线精品| 欧美精品一区二区不卡| 欧美日韩亚洲综合| 欧美最猛性xxxxx直播| av亚洲精华国产精华精华 | 午夜电影网亚洲视频| 亚洲日本在线看| 国产精品三级av| 国产亚洲精品资源在线26u| 精品国产一区二区三区av性色| 欧美日韩黄视频| 欧美三级午夜理伦三级中视频| 99精品热视频| 99热在这里有精品免费| 成人午夜大片免费观看| 国产成人自拍网| 国产成人在线网站| 国产精品99精品久久免费| 极品少妇xxxx精品少妇| 极品美女销魂一区二区三区免费 | 日本成人在线看| 日韩精品亚洲专区| 日本视频一区二区| 蜜桃久久精品一区二区| 麻豆一区二区三| 国产精品99久久久久| 成人不卡免费av| 一本一道波多野结衣一区二区| 91福利资源站| 在线观看91精品国产麻豆| 欧美一级高清片| 日韩三级在线观看| 国产喷白浆一区二区三区| 国产精品国产三级国产aⅴ入口 | 欧美性大战久久久久久久蜜臀 | 91久久精品网| 777奇米四色成人影色区| 日韩一区二区在线观看| 久久久99久久精品欧美| 中文字幕一区二区视频| 香蕉影视欧美成人| 极品少妇xxxx精品少妇| 97精品国产97久久久久久久久久久久 | 久久精品国产精品亚洲精品| 韩国在线一区二区| 在线视频综合导航| 欧美一区二区三区免费大片| 国产亚洲一二三区| 一区二区三区av电影| 国产一区日韩二区欧美三区| 成+人+亚洲+综合天堂| 欧美日韩高清一区二区| 久久嫩草精品久久久久| 亚洲欧美综合另类在线卡通| 亚洲国产精品嫩草影院| 日韩成人精品在线| 99视频精品在线| 91精品国模一区二区三区| 中文一区二区完整视频在线观看| 亚洲私人影院在线观看| 奇米一区二区三区| www.在线欧美| 日韩欧美区一区二| 亚洲欧美在线视频观看| 久久精品国产成人一区二区三区| 成人小视频免费在线观看| 欧美三级电影网| 欧美高清在线一区| 免费在线观看一区二区三区| 成人午夜视频在线| 日韩午夜电影在线观看| 亚洲欧美日韩国产综合在线| 精品一区二区综合| 欧美色电影在线| 18成人在线视频| 国产精品夜夜嗨| 正在播放亚洲一区| 亚洲精品老司机| a在线欧美一区| 久久久99精品免费观看不卡| 日本中文一区二区三区| 欧美三级午夜理伦三级中视频| 国产精品久久久爽爽爽麻豆色哟哟 | 91在线观看免费视频| 91精品在线观看入口| 亚洲色欲色欲www| 91免费观看视频| 亚洲柠檬福利资源导航| a级精品国产片在线观看| 久久精品人人做人人爽97| 国产成人精品影视| 欧美理论片在线| 亚洲色图一区二区| 成人免费三级在线| 久久久www免费人成精品| 久久不见久久见中文字幕免费| 在线观看免费视频综合| 亚洲视频你懂的| 97se亚洲国产综合在线| 中文字幕一区二区在线播放| 成人一区二区三区在线观看 | 亚洲国产精品一区二区www在线| 99这里只有精品| 亚洲人被黑人高潮完整版| 91麻豆国产在线观看| 一区二区三区**美女毛片| 91国在线观看|