Attributes 属性
时间:2007-12-27 来源:不详 作者:林子
设置或返回文件或文件夹的属性。 根据不同属性为读/写或只读。
本文来自织梦
object.Attributes [= newattributes]
织梦好,好织梦
参数
object 织梦内容管理系统
必选项。 应为 File 或 Folder 对象的名称。
本文来自织梦
newattributes 织梦内容管理系统
可选项。 假如提供了这个部分,那么 newattributes 将成为指定的 object 的新属性值。
copyright dedecms
设置
newattributes 参数可以是下列各值或者这些值的任意逻辑组合:
织梦内容管理系统
说明
下面的代码通过一个文件说明了 Attributes 属性的用法: dedecms.com
function ToggleArchiveBit(filespec) {
var fso, f, r, s;
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.GetFile(filespec)
if (f.attributes && 32)
{
f.attributes = f.attributes - 32;
s = "Archive bit is cleared.";
}
else
{
f.attributes = f.attributes 32;
s ="Archive bit is set.";
}
return(s);
} dedecms.com
请参阅
DateCreated 属性 | DateLastAccessed 属性 | DateLastModified 属性 | Drive 属性 | Files 属性 | IsRootFolder 属性 | Name 属性 | ParentFolder 属性 | Path 属性 | ShortName 属性 | ShortPath 属性 | Size 属性 | SubFolders 属性 | Type 属性
应用于: File 对象 | Folder 对象
织梦内容管理系统

上一篇:CompareMode 属性 下一篇:AtEndOfStream 属性
文章评论
共有位Admini5网友发表了评论 查看完整内容