Attributes

ASP Attributes xususiyati


❮ File obyektining to‘liq ma’lumotnomasi

Attributes xususiyati ko‘rsatilgan fayl yoki papkaning atributini yoki atributlarini belgilash yoki qaytarish uchun ishlatiladi.


Sintaksis

FileObject.Attributes[=newattributes] FolderObject.Attributes[=newattributes]

Parametr Tavsif
newattributes Ixtiyoriy. Fayl yoki papka uchun atribut qiymatini belgilaydi.

Quyidagi qiymatlardan istalganini yoki ularning kombinatsiyasini qabul qilishi mumkin:

0 = Oddiy fayl
1 = Faqat o‘qish uchun mo‘ljallangan fayl
2 = Yashirin fayl
4 = Tizim fayli
16 = Papka yoki katalog
32 = Oxirgi zaxira nusxa (backup) olingandan keyin o‘zgargan fayl
1024 = Havola yoki yorliq (shortcut)
2048 = Siqilgan fayl


File obyekti uchun misol

<% 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 %> Output: The attributes of the file are: 32


Folder obyekti uchun misol

<% 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 %> Output: The attributes of the folder are: 16

❮ File obyektining to‘liq ma’lumotnomasi

W3Schools Pathfinder

Yutuqlaringizni kuzating – bu bepul!