air,java,Delphi递归获得文件夹及其子文件信息
把以前做过的项目总结一下!参加工作以来一共用三种不同语言实现了获得文件夹及其子文件信息。为了方便以后使用总结一下
air实现:
private function getfile(filelist:File):Array{
var list:Array = filelist.getDirectoryListing();
var count:uint=list.length;
for (var i:uint = 0; i < count; i++) {
if(list[i].isDirectory) {
var listtemp:Array = getfile(list[i]);
list = list.concat(listtemp);
}else{
continue;
}
}
return list;
}
把最后的文件信息放到array里面
delphi实现:
procedure Tallmark.GetDirectoryFiles(const ADirectory: string;
fileList: TStrings);
var
Dir: TSearchRec;
Ret: integer;
Path: string;
begin
if fileList <> nil then
begin
Path := ExtractFilePath(ADirectory);
Ret := Sysutils.FindFirst(ADirectory, faAnyFile, Dir);
if Ret <> NO_ERROR then exit;
try
while ret = NO_ERROR do
begin
if Dir.attr and faDirectory = 0 then fileList.Add(path + Dir.Name);
if (Dir.Attr in [faDirectory]) and (Dir.Name[1] <> '.') then
begin
GetDirectoryFiles(Path + Dir.Name + '\*.dbf', fileList);
end;
Ret := Sysutils.FindNext(Dir);
end;
finally
Sysutils.FindClose(Dir);
end;
end;
end;
把所有的文件信息放到一个TStrings里面
相关文档:
据InternetNews.com报道,作为今年的第一次更新,Java SE 6 Update 18(也称为6u18)不仅修复了超过300个bug(够多的啊),而且更值得注意的是,提升了虚拟机HotSpot的性能,这将同时有益于Java和JavaFX(基于JVM的RIA方案)应用程序。
此外,Java安装器的底层机制被替换,可用性大大提高。
jar文件创建长期存在的一个bug ......
JAVA开发者最常去的20个英文网站
1.[http://www.javaalmanac.com] – Java开发者年鉴一书的在线版本. 要想快速查到某种Java技巧的用法及示例代码, 这是一个不错的去处.
2.[http://www.onjava.com] – O’Reilly的Java网站. 每周都有新文章.
3.[http://java.sun.com] – 官方的Java开发者网站 &ndash ......
In recent years, web services have emerged as a popular technology for remote method calls. Technically, a web service has two components:
A service that can be accessed with the SOAP transport protocol
A description of the service in the WSDL format
SOAP is an XML protocol for invoking remote me ......
1. java是什么
Java是一种编程语言,跟汇编、C、C++一样,是用于软件编程的开发语言。
Java是一种开发、运行环境,java程序的开发要依赖这种环境。
2. java的特点
java语言具有与平台无关,面向对象,健壮性的特点
1).与平台的无关性
与jav ......
多线程是java的一个优势,java使得程序员可以很方便的进行多线程程序开发。获得更好的性能。
关于多线程的概念以及一般的多线程编程,比如如何以及为何实现runnable接口,为何stop()会被Deprecated掉等等,这个请看matrix之前的多线程编程基础或者sun的java文档。
关于多线程编程,有几点这里要提到的:
1。既然stop( ......