ASP Attributes ਪੈਰਾਮੀਟਰ
ਪਰਿਭਾਸ਼ਾ ਅਤੇ ਵਰਤੋਂ
Attributes ਪੈਰਾਮੀਟਰ ਵਿੱਚ ਨਿਰਧਾਰਿਤ ਕੀਤੇ ਗਏ ਫਾਈਲ ਜਾਂ ਫੋਲਡਰ ਦੇ ਅਕਸੈਸ਼ਨਸ ਨੂੰ ਸੈਟ ਕਰਨ ਜਾਂ ਵਾਪਸ ਲਿਆਉਣ ਲਈ ਵਰਤਿਆ ਜਾਂਦਾ ਹੈ。
ਸਿਧਾਂਤ:
FileObject.Attributes[=newattributes] FolderObject.Attributes[=newattributes]
ਪੈਰਾਮੀਟਰ | ਵਰਣਨ |
---|---|
newattributes |
ਵਿਕਲਪਿਤ।ਫਾਈਲ ਜਾਂ ਫੋਲਡਰ ਦੇ ਅਕਸੈਸ਼ਨਸ ਵਾਲੇ ਪੈਰਾਮੀਟਰ ਨੂੰ ਨਿਰਧਾਰਿਤ ਕਰਦਾ ਹੈ。 ਇਕ ਜਾਂ ਇਕ ਤੋਂ ਵੱਧ ਮੁੱਲਾਂ ਵਿੱਚੋਂ ਇੱਕ ਸ਼ਿਕਾਰ ਕਰੋ ਜਾਂ ਮਿਸ਼ਰਣ ਵਿੱਚ ਇਕ ਸ਼ਿਕਾਰ ਕਰੋ:
|
ਫਾਈਲ ਆਬਜੈਕਟ ਦੇ ਉਦਾਹਰਣ
<% dim fs,f set fs=Server.CreateObject("Scripting.FileSystemObject") set f=fs.GetFile("c:\test.txt") Response.Write("ਫਾਈਲ ਦੇ ਅਕਸੈਸ਼ਨਸ: ") ریسپونس. وریٹ(}}f.Attributes) set f=nothing سٹ فس نو نینگ %>
خروج:
The attributes of the file are: 32
ਫੋਲਡਰ ਆਬਜੈਕਟ ਦੇ ਉਦਾਹਰਣ
<% dim fs,fo set fs=Server.CreateObject("Scripting.FileSystemObject") set fo=fs.GetFolder("c:\test") Response.Write("ਫੋਲਡਰ ਦੇ ਅਕਸੈਸ਼ਨਸ: ") ریسپونس. وریٹ(}}فو اٹریبز) سٹ فو نینگ سٹ فس نو نینگ %>
خروج:
فولڈر کی اٹریبز: 16