{
String s = getParent()
if(s == null)
return null
else
return new File(s, prefixLength)
}
public String getPath()
{
return path
}
public boolean isAbsolute()
{
return fs.isAbsolute(this)
}
public String getAbsolutePath()
{
return fs.resolve(this)
}
public File getAbsoluteFile()
{
return new File(getAbsolutePath())
}
public String getCanonicalPath()
throws IOException
{
return fs.canonicalize(fs.resolve(this))
}
public File getCanonicalFile()
throws IOException
{
return new File(getCanonicalPath())
}
public URL toURL()
throws MalformedURLException
{
String s = getAbsolutePath()
if(separatorChar != '/')
s = s.replace(separatorChar, '/')
if(!s.startsWith("/"))
s = "/" + s
if(!s.endsWith("/") && isDirectory())
s = s + "/"
return new URL("file", "", s)
}
public boolean canRead()
{
SecurityManager securitymanager = System.getSecurityManager()
if(securitymanager != null)
securitymanager.checkRead(path)
return fs.checkAccess(this, false)
}
public boolean canWrite()
{
SecurityManager securitymanager = System.getSecurityManager()
if(securitymanager != null)
securitymanager.checkWrite(path)
return fs.checkAccess(this, true)
}
public boolean exists()
{
SecurityManager securitymanager = System.getSecurityManager()
if(securitymanager != null)
securitymanager.checkRead(path)
return (fs.getBooleanAttributes(this) & 0x1) != 0
}
public boolean isDirectory()
{
SecurityManager securitymanager = System.getSecurityManager()
if(securitymanager != null)
securitymanager.checkRead(path)
return (fs.getBooleanAttributes(this) & 0x4) != 0
}
public boolean isFile()
{
SecurityManager securitymanager = System.getSecurityManager()
if(securitymanager != null)
securitymanager.checkRead(path)
return (fs.getBooleanAttributes(this) & 0x2) != 0
}
public boolean isHidden()
{
SecurityManager securitymanager = System.getSecurityManager()
if(securitymanager != null)
securitymanager.checkRead(path)
return (fs.getBooleanAttributes(this) & 0x8) != 0
}
public long lastModified()
{
SecurityManager securitymanager = System.getSecurityManager()
if(securitymanager != null)
securitymanager.checkRead(path)
return fs.getLastModifiedTime(this)
}
public long length()
{
SecurityManager securitymanager = System.getSecurityManager()
if(securitymanager != null)
securitymanager.checkRead(path)
return fs.getLength(this)
}
public boolean createNewFile()
throws IOException
{
SecurityManager securitymanager = System.getSecurityManager()
if(securitymanager != null)
securitymanager.checkWrite(path)
return fs.createFileExclusively(path)
}
public boolean delete()
{
SecurityManager securitymanager = System.getSecurityManager()
if(securitymanager != null)
securitymanager.checkDelete(path)
return fs.delete(this)
}
public void deleteOnExit()
{
SecurityManager securitymanager = System.getSecurityManager()
if(securitymanager != null)
securitymanager.checkDelete(path)
fs.deleteOnExit(this)
}
public String[] list()
{
SecurityManager securitymanager = System.getSecurityManager()
if(securitymanager != null)
securitymanager.checkRead(path)
return fs.list(this)
}
public String[] list(FilenameFilter filenamefilter)
{
String as[] = list()
if(as == null || filenamefilter == null)
return as
ArrayList arraylist = new ArrayList()
for(int i = 0 i < as.length i++)
if(filenamefilter.accept(this, as[i]))
arraylist.add(as[i])
return (String[])arraylist.toArray(new String[0])
}
public File[] listFiles()
{
String as[] = list()
if(as == null)
return null
int i = as.length
File afile[] = new File[i]
for(int j = 0 j < i j++)
afile[j] = new File(path, as[j])
return afile
}
public File[] listFiles(FilenameFilter filenamefilter)
{
String as[] = list()
if(as == null)
return null
ArrayList arraylist = new ArrayList()
for(int i = 0 i < as.length i++)
if(filenamefilter == null || filenamefilter.accept(this, as[i]))
arraylist.add(new File(path, as[i]))
return (File[])arraylist.toArray(new File[0])
}
public File[] listFiles(FileFilter filefilter)
{
String as[] = list()
if(as == null)
return null
ArrayList arraylist = new ArrayList()
for(int i = 0 i < as.length i++)
{
File file = new File(path, as[i])
if(filefilter == null || filefilter.accept(file))
arraylist.add(file)
}
return (File[])arraylist.toArray(new File[0])
}
解决方法如下:1、首先 win+r
2、打开运行程序
3、输入: regedit
4、找到: 计算机/HKEY_CURRENT_USER/SOFTWARE/MICROSOFT/WINDOWS/currentversion/Explorer/FileExts/.lnk会发现有openwithlist 和 openwithprogids 两项,如果有其他的选项将其删除
5、再将openwithlist 内的除默认以外的所有键值都删除
6、将openwithprogids内的除默认和lnkfile以外的所有键值都删除.
7、保存退出即可
如果还有图标不能还原的可以在控制面板〉外观和个性化〉个性化〉 点击更改桌面图标按钮,在d出的面板内点击 还原默
认即可!
重启就可以了~
右击桌面上“计算机”图标,从d出的快捷菜单中选择“属性”,打开“系统”窗口。配置Java的系统环境变量
在打开的“系统”窗口中单击左侧“高级系统设置”选项。
配置Java的系统环境变量
在d出的“系统属性”对话框中,切换到“高级”选项卡,单击“环境变量”按钮。
配置Java的系统环境变量
4
在d出的“环境变量”对话框中,在“系统变量”栏中选择“Path”选项,然后单击“编辑”按钮。
配置Java的系统环境变量
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)