ASP Attributes ÊôÐÔ

¶¨ÒåºÍÓ÷¨

Attributes ÊôÐÔÓÃÓÚÉèÖûò·µ»ØÖ¸¶¨Îļþ»òÎļþ¼ÐµÄÊôÐÔ¡£

Óï·¨£º

FileObject.Attributes[=newattributes]
FolderObject.Attributes[=newattributes]
²ÎÊý ÃèÊö
newattributes

¿ÉÑ¡µÄ¡£¹æ¶¨Îļþ»òÎļþ¼ÐµÄÊôÐÔÖµ¡£

¿É²ÉÓÃÏÂÁÐÖµÖ®Ò»»òÕßÏÂÁÐÖµµÄ×éºÏ£º

  • 0 = ÆÕͨÎļþ¡£Ã»ÓÐÉèÖÃÈκÎÊôÐÔ¡£
  • 1 = Ö»¶ÁÎļþ¡£¿É¶Áд¡£
  • 2 = Òþ²ØÎļþ¡£¿É¶Áд¡£
  • 4 = ϵͳÎļþ¡£¿É¶Áд¡£
  • 16 = Îļþ¼Ð»òĿ¼¡£Ö»¶Á¡£
  • 32 = Éϴα¸·ÝºóÒѸü¸ÄµÄÎļþ¡£¿É¶Áд¡£
  • 1024 = Á´½Ó»ò¿ì½Ý·½Ê½¡£Ö»¶Á¡£
  • 2048 = ѹËõÎļþ¡£Ö»¶Á¡£

Õë¶Ô File ¶ÔÏóµÄÀý×Ó

<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:\test.txt")
Response.Write("The attributes of the file are: ")
Response.Write(f.Attributes)
set f=nothing
set fs=nothing
%>

Êä³ö£º

The attributes of the file are: 32

Õë¶Ô Folder ¶ÔÏóµÄÀý×Ó

<%
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\test")
Response.Write("The attributes of the folder are: ")
Response.Write(fo.Attributes)
set fo=nothing
set fs=nothing
%>

Êä³ö£º

The attributes of the folder are: 16
VUE