/[classpath]/classpath/java/io/File.java
ViewVC logotype

Diff of /classpath/java/io/File.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.30 by mkoch, Tue May 6 10:06:39 2003 UTC revision 1.31 by mkoch, Sat May 10 06:10:19 2003 UTC
# Line 939  public class File implements Serializabl Line 939  public class File implements Serializabl
939     *     *
940     * @since 1.2     * @since 1.2
941     */     */
942    public static synchronized File createTempFile (String prefix, String suffix,    public static File createTempFile (String prefix, String suffix,
943                                                    File directory)                                       File directory)
944      throws IllegalArgumentException, SecurityException, IOException      throws IOException
945    {    {
946      // Grab the system temp directory if necessary      // Grab the system temp directory if necessary
947      if (directory == null)      if (directory == null)
# Line 1089  public class File implements Serializabl Line 1089  public class File implements Serializabl
1089     *     *
1090     * @since 1.2     * @since 1.2
1091     */     */
1092    public int compareTo (File file)    public int compareTo (File other)
1093    {    {
1094      String p1, p2;      String p1, p2;
1095            
1096      try      try
1097        {          {  
1098          p1 = getCanonicalPath();          p1 = getCanonicalPath ();
1099          p2 = file.getCanonicalPath();          p2 = other.getCanonicalPath ();
1100        }        }
1101      catch(IOException e)      catch(IOException e)
1102        {        {
# Line 1104  public class File implements Serializabl Line 1104  public class File implements Serializabl
1104          // Even if we don't call the method, we must replicate the functionality          // Even if we don't call the method, we must replicate the functionality
1105          // which per the spec can fail.  What happens in that situation?          // which per the spec can fail.  What happens in that situation?
1106          // I just assume the files are equal!          // I just assume the files are equal!
1107          //          return 0;
         return(0);  
1108        }        }
1109    
1110      return p1.compareTo (p2);      return p1.compareTo (p2);
# Line 1132  public class File implements Serializabl Line 1131  public class File implements Serializabl
1131     *     *
1132     * @since 1.2     * @since 1.2
1133     */     */
1134    public int compareTo (Object obj) throws ClassCastException    public int compareTo (Object obj)
1135    {    {
1136      return compareTo ((File) obj);      return compareTo ((File) obj);
1137    }    }
# Line 1209  public class File implements Serializabl Line 1208  public class File implements Serializabl
1208        s.checkRead (path);        s.checkRead (path);
1209    }    }
1210    
1211    /**    /**
1212     * Calling this method requests that the file represented by this object     * Calling this method requests that the file represented by this object
1213     * be deleted when the virtual machine exits.  Note that this request cannot     * be deleted when the virtual machine exits.  Note that this request cannot
1214     * be cancelled.  Also, it will only be carried out if the virtual machine     * be cancelled.  Also, it will only be carried out if the virtual machine
1215     * exits normally.     * exits normally.
1216     *     *
1217     * @exception SecurityException If deleting of the file is not allowed     * @exception SecurityException If deleting of the file is not allowed
1218       *
1219       * @since 1.2
1220     */     */
1221    public void deleteOnExit ()    public void deleteOnExit ()
1222    {    {

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26