码迷,mamicode.com
首页 >  
搜索关键字:getpath    ( 286个结果
Android 文件基本操作
1、遍历指定文件夹下的文件: File[] files = new File("/test").listFiles(); for (File file : files) { result += file.getPath() + "\n"; Log.i("sang","r...
分类:移动开发   时间:2014-09-04 13:05:39    阅读次数:193
android 获取系统默认路径
Environment.getDataDirectory().getPath() : /dataEnvironment.getDownloadCacheDirectory().getPath() : /cacheEnvironment.getExternalStorageDirectory().ge...
分类:移动开发   时间:2014-09-02 17:35:25    阅读次数:183
java.lang.class.getResource
静态块,在项目启动的时候就执行,是主动执行的。静态方法, 是被动执行的,需要被调用才执行。static{try{Stringpath=Config.class.getResource("/").toURI().getPath();is=newFileInputStream(path+"config....
分类:编程语言   时间:2014-09-02 12:04:44    阅读次数:157
java web项目中 读取properties 路径的问题
可以先获取项目的classPathString classPath = this.getClass().getResource("/").getPath();//获取classPath(部署到tomcat的路径上)我的为/D:/apache-tomcat-6.0.29/webapps/demo/WE...
分类:编程语言   时间:2014-08-19 12:47:34    阅读次数:247
WPF 浏览文件夹,获取其路径
public void GetPath(System.Windows.Controls.TextBox TB) { FolderBrowserDialog FBD = new FolderBrowserDialog(); FB...
分类:其他好文   时间:2014-08-14 19:59:19    阅读次数:204
java路径中的空格问题(转)
java路径中的空格问题 1、 URLTest.class.getResource("/").getPath(); URLTest.class.getResource("/").getFile(); URLTest.class.getClassLoader().getResource("")....
分类:编程语言   时间:2014-08-03 22:48:36    阅读次数:216
Java路径问题解决方案汇集
Java路径中的空格问题1、 URLTest.class.getResource("/").getPath(); URLTest.class.getResource("/").getFile(); URLTest.class.getClassLoader().getResource(""...
分类:编程语言   时间:2014-07-28 15:05:13    阅读次数:225
文件下的目录
publicclassCreatFile{ publicstaticvoidmain(String[]args){ Filef=newFile("E:\\"); Filelist[]=f.listFiles(); for(inti=0;i<list.length;i++) { if(list[i].isDirectory()) { System.out.println("目录名:"+list[i].getName()+list[i].getPath()); Filef2..
分类:其他好文   时间:2014-07-24 23:47:54    阅读次数:190
Android下获取手机和SD卡的总空间和可用空间
获取SD卡的总空间和可用空间 File path = Environment.getExternalStorageDirectory(); StatFs stat = new StatFs(path.getPath()); long blockSize = stat.getBlockSize(); long totalBlocks = stat.getBlockCount(); long ava...
分类:移动开发   时间:2014-07-18 21:22:16    阅读次数:247
iOS第三方类库之FMDatabase
FMDatabase 的使用方法- (NSString*) getPath { NSArray* paths =NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES) ; return[[pathso...
分类:移动开发   时间:2014-07-18 10:08:04    阅读次数:342
286条   上一页 1 ... 26 27 28 29 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!