⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 如何获得目录的属性?.htm

📁 关于delphi的一些技巧性文档
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0055)http://www.delphibbs.com/delphibbs/dispq.asp?lid=207946 -->
<HTML xmlns:tools><HEAD><TITLE>大富翁论坛 delphibbs.com</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<META content=大富翁,论坛,技术,积分,排行榜,Delphi,Kylix,Java,XML,XSLT,forum name=keywords>
<META 
content="大富翁论坛(delphibbs.com)关于 Delphi, Kylix, Java 的技术论坛。采用积分游戏形式,靠您的智慧上大富翁排行榜!" 
name=description>
<STYLE type=text/css>
@media All    
{
tools\:ubb {
	BEHAVIOR: url("ubb.htc")
}

}
</STYLE>
<LINK href="如何获得目录的属性?.files/web_font.css" rel=stylesheet type=text/css>
<SCRIPT src="如何获得目录的属性?.files/loadxmln.js"></SCRIPT>

<META content="MSHTML 5.00.2614.3500" name=GENERATOR></HEAD>
<BODY onload=showMsg();show() topMargin=2>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width="100%">
  <TBODY>
  <TR>
    <TD align=middle><A 
      href="http://www.delphibbs.com/delphibbs/rules.asp">游戏规则</A> <A 
      href="http://www.delphibbs.com/delphibbs/register.asp">免费注册</A> <IMG 
      align=middle height=60 src="如何获得目录的属性?.files/dfwlogo.gif" width=240> <A 
      href="http://www.delphibbs.com/delphibbs/download.asp">资料下载</A> <A 
      href="http://www.delphibbs.com/delphibbs/index.asp">关于本站</A> </TD></TR>
  <TR>
    <TD align=middle colSpan=2><A 
      href="http://www.delphibbs.com/delphibbs/listroom.asp">问题分类</A> <A 
      href="http://www.delphibbs.com/delphibbs/listq.asp">问题列表</A> <A 
      href="http://www.delphibbs.com/delphibbs/listu.asp">富翁列表</A> <A 
      href="http://www.delphibbs.com/delphibbs/dispu.asp">我的信息</A> <A 
      href="http://www.delphibbs.com/delphibbs/askqn.asp">提出问题</A> <A 
      href="http://www.delphibbs.com/delphibbs/uonline.asp">在线富翁</A> <A 
      href="http://www.delphibbs.com/delphibbs/calendar.asp">富翁日历</A> <A 
      href="http://richsearch.com/" target=_blank>全文检索</A> 大富翁练功场 
</TD></TR></TBODY></TABLE><xml id=menuxml><?xml version="1.0" encoding="gb2312" ?><DFWML type="注册信息"><URL>/delphibbs/dispq.asp</URL><QUERY_STRING>lid=207946</QUERY_STRING><USER Name="earlc"><points>1620</points><expoints>0</expoints><earnings>0</earnings><gettimes>8</gettimes><usertype>0</usertype><lasttime>2002-11-18 20:58:00</lasttime></USER><USER Name="" /></DFWML></xml><xml id=menuxsl src="login.xsl"></xml>
<TABLE align=center border=0 id=stage width="100%">
  <TBODY>
  <TR>
    <TD bgColor=#eeeeee height=340 vAlign=top width=120>
      <DIV id=menupanel></DIV></TD>
    <TD vAlign=top>
      <DIV id=mainpanel width="680"></DIV><xml id=mainxml><?xml version="1.0" encoding="gb2312" ?><DFWML type="问题显示" title="如何获得目录的属性?">
<Q ID="207946" status="2"><subject><![CDATA[如何获得目录的属性?]]></subject><from>faun</from>
<content><![CDATA[如何获得目录的属性?]]></content><points>50</points><read_n>44</read_n><reply_n>3</reply_n><regdatetime>2000-3-29 22:59:00</regdatetime><datetime>2000-3-29 23:37:00</datetime><room>Windows API</room><master>amo</master><master2>cAkk</master2><expert>Pipi.</expert></Q>
<REPLY><Q ID="207957"><from>Pipi.</from><datetime>2000-3-29 23:09:00</datetime>
<content><![CDATA[FindFirstFile, 得到 WIN32_FIND_DATA.dwFileAttributes
然后 FindClose]]></content></Q>
<Q ID="207972"><from>沈前卫</from><datetime>2000-3-29 23:22:00</datetime>
<content><![CDATA[看看Delphi的源代码吧。(示例如何使用Pipi.介绍的函数)

function FileAge(const FileName: string): Integer;
var
  Handle: THandle;
  FindData: TWin32FindData;
  LocalFileTime: TFileTime;
begin
  Handle := FindFirstFile(PChar(FileName), FindData);
  if Handle &lt;&gt; INVALID_HANDLE_VALUE then
  begin
    Windows.FindClose(Handle);
    if (FindData.dwFileAttributes and FILE_ATTRIBUTE_DIRECTORY) = 0 then
    begin
      FileTimeToLocalFileTime(FindData.ftLastWriteTime, LocalFileTime);
      if FileTimeToDosDateTime(LocalFileTime, LongRec(Result).Hi,
        LongRec(Result).Lo) then Exit;
    end;
  end;
  Result := -1;
end;
]]></content></Q>
<Q ID="207995"><from>faun</from><datetime>2000-3-29 23:37:00</datetime>
<content><![CDATA[接受答案了.]]></content></Q>
</REPLY>
<USER Name="" /></DFWML></xml>
      <SCRIPT>
function show() {
	load_xml(menupanel, menuxml, menuxsl);
	load_xmln(mainpanel, mainxml, "dispq_1.xsl");	
}

function changeFontSize(size) {
	obj = document.getElementById('mainpanel');	
	if (!obj) alert('not found');
	for (var ii=0; ii < obj.all.tags('TD').length; ii++) {
		var td = obj.all.tags("TD").item(ii);
		td.style.fontFamily = "宋体";
		td.style.fontSize = size;
		td.style.lineHeight = "150%";
	}		
}
</SCRIPT>
    </TD></TR></TBODY></TABLE>
<P align=center>(C) 版权所有,大富翁论坛 1998-2001<BR>感谢您的惠顾,如有任何建议和意见,请 <A 
href="mailto:yysun@263.net">联系版主</A>。<FONT 
face=Arial><SMALL>2001.4.1</SMALL></FONT></P></BODY></HTML>

<HTML>
<BODY >
<script language=vbscript></script>
<script language=vbscript></script>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -