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

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

?? file.java

?? gcc的組建
?? 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一区二区三区免费野_久草精品视频
成人久久18免费网站麻豆| 亚洲综合精品久久| 国产精品麻豆久久久| 偷拍与自拍一区| 成人动漫一区二区在线| 精品三级av在线| 亚洲电影一区二区三区| 成人午夜精品在线| 久久综合色婷婷| 视频在线观看91| 在线免费一区三区| 亚洲欧洲国产日韩| 高清免费成人av| 欧美r级电影在线观看| 亚洲国产精品久久久男人的天堂 | 欧美伦理影视网| 国产精品国产自产拍高清av| 久久不见久久见免费视频7| 在线影院国内精品| 国产精品乱码一区二区三区软件 | 久久影院午夜论| 日本欧美一区二区三区| 欧美在线影院一区二区| 亚洲卡通动漫在线| 91同城在线观看| 亚洲天堂免费看| 91蝌蚪porny| 亚洲人成网站精品片在线观看| 成人动漫在线一区| ●精品国产综合乱码久久久久| 粉嫩久久99精品久久久久久夜| 国产欧美综合在线观看第十页| 国产一区二区三区久久久| 欧美草草影院在线视频| 加勒比av一区二区| 久久蜜桃av一区二区天堂| 国产一区二区三区四区在线观看 | 综合久久一区二区三区| 91麻豆文化传媒在线观看| 亚洲欧美国产高清| 欧美午夜不卡在线观看免费| 午夜精品久久久久久久久久| 欧美精品免费视频| 久久99国产精品久久99果冻传媒| 精品国产一区二区三区久久影院 | 久久精品在线观看| 成人免费av在线| 亚洲男同性视频| 欧美日韩一区精品| 久久电影国产免费久久电影| 国产网站一区二区三区| 99久久综合狠狠综合久久| 不卡的看片网站| 亚洲国产高清在线观看视频| 91原创在线视频| 亚洲第一福利一区| 久久综合av免费| eeuss鲁片一区二区三区| 亚洲国产日韩a在线播放| 日韩午夜激情视频| 岛国一区二区在线观看| 亚洲综合清纯丝袜自拍| 精品国产乱码久久久久久牛牛 | 日本一区二区三区久久久久久久久不| 成人aa视频在线观看| 一区二区高清视频在线观看| 日韩午夜精品视频| 99久久久免费精品国产一区二区| 亚洲国产成人tv| 日本一区二区三区在线观看| 欧美日韩一区二区在线观看| 极品少妇xxxx偷拍精品少妇| 国产精品国产自产拍在线| 欧美久久高跟鞋激| 成人av小说网| 日日摸夜夜添夜夜添国产精品| 久久精品在这里| 在线91免费看| 99久久综合国产精品| 久久精品国产一区二区| 亚洲精品久久久久久国产精华液| 日韩精品一区二区三区中文不卡 | 国产999精品久久| 图片区小说区区亚洲影院| 中文字幕在线不卡一区| 精品美女被调教视频大全网站| 色婷婷久久久亚洲一区二区三区 | 美腿丝袜一区二区三区| 亚洲精品国产视频| 国产精品美日韩| 精品成人一区二区三区四区| 欧美性生交片4| 97se亚洲国产综合自在线| 国产一区不卡在线| 首页亚洲欧美制服丝腿| 亚洲视频一区二区免费在线观看| 精品日本一线二线三线不卡| 欧美美女直播网站| 一道本成人在线| av亚洲精华国产精华精华| 国产精品一区二区无线| 精品一区二区免费看| 日韩黄色小视频| 亚洲国产另类av| 亚洲精品国产高清久久伦理二区| 国产精品久久免费看| 国产日韩av一区二区| 久久蜜桃av一区二区天堂| 精品国产一区二区精华| 日韩欧美自拍偷拍| 日韩午夜精品电影| 欧美大片在线观看| 精品国产在天天线2019| 精品国产精品网麻豆系列 | 蜜臀91精品一区二区三区| 午夜av区久久| 午夜不卡av免费| 日韩1区2区日韩1区2区| 日本vs亚洲vs韩国一区三区二区 | 国产成人精品亚洲777人妖| 国产美女精品人人做人人爽| 精品一区二区三区免费播放| 精品一区二区三区免费| 国产成人精品免费看| 国产91高潮流白浆在线麻豆| k8久久久一区二区三区| 91麻豆精品视频| 欧美日韩视频一区二区| 日韩午夜激情免费电影| 久久久久久久综合日本| 国产精品污污网站在线观看| 中文字幕一区二区三区不卡在线| 亚洲精品中文字幕乱码三区| 亚洲第四色夜色| 狠狠色2019综合网| 国产成a人亚洲| 色综合视频在线观看| 欧美日韩国产区一| xfplay精品久久| 亚洲欧美偷拍卡通变态| 午夜婷婷国产麻豆精品| 激情久久五月天| 色综合久久久久| 日韩欧美精品在线视频| 国产精品超碰97尤物18| 亚洲成a人v欧美综合天堂| 久久av资源网| 91日韩一区二区三区| 欧美日韩高清一区二区三区| 2020国产精品久久精品美国| 亚洲色图视频免费播放| 精品一区在线看| 99久久精品国产导航| 日韩欧美二区三区| 日韩理论在线观看| 麻豆精品久久精品色综合| 不卡的av在线| 日韩欧美色综合网站| 亚洲欧美日韩国产手机在线 | 99精品热视频| 日韩女优视频免费观看| 亚洲欧美国产高清| 国产老肥熟一区二区三区| 欧美性xxxxx极品少妇| 国产亚洲精品超碰| 天天色图综合网| 91影院在线免费观看| 精品久久久久久久久久久久久久久| 综合久久综合久久| 国产剧情一区二区| 日韩一区二区三| 伊人性伊人情综合网| 精品一区二区三区欧美| 欧美高清视频一二三区 | 日韩成人dvd| 在线亚洲免费视频| 国产三级精品视频| 免费观看一级特黄欧美大片| 色婷婷国产精品| 国产精品美女久久久久高潮| 久久精品噜噜噜成人88aⅴ| 精品视频免费看| 亚洲乱码精品一二三四区日韩在线| 国产乱一区二区| 日韩一二三区视频| 日韩黄色免费电影| 欧美日韩你懂得| 一级精品视频在线观看宜春院| eeuss鲁片一区二区三区| 欧美国产日韩亚洲一区| 国产乱码精品1区2区3区| 久久综合九色综合久久久精品综合| 香蕉影视欧美成人| 欧美日韩国产一区二区三区地区| 亚洲欧美另类久久久精品| 91网址在线看| 狠狠v欧美v日韩v亚洲ⅴ| 日韩亚洲欧美成人一区| 麻豆91免费看| 精品美女一区二区|