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("ဖူးသား၏ အချက်အလက်များ: ")
Response.Write(fo.Attributes)
set fo=nothing
set fs=nothing
%>

输出:

The attributes of the folder are: 16