I'm working on a JavaScript script for Synchronet that involves extracting an archive into a temporary directory, and then it will recursively delete the temporary directory when it's done.
My BBS is running in Windows 2000, and it looks like if one of the
extracted files has the read-only attribute set, file_remove() doesn't remove it. I then started to look into how file attributes are represented in Synchronet's JavaScript model and if it's possible to change them. I noticed that the File class has a property called 'attributes', and there's also a function called file_attrib(), which will give you a file's attributes. The attributes are represented by a number, but the docs don't seem to say what that number means or if there are any variables anywhere that represent different file attributes. I checked sbbsdefs.js and didn't see any mention of file attribute definitions in there.
So, my questions are:
1. Is it possible to delete a file regardless of its attributes? And if
so, how?
2. For File's attribute property and file_attrib()'s return value, what are the attribute values that it can be checked against (or more precisely, where can I find the list of attributes)?
3. If you wanted to change a file's attributes, can that be done by opening it with the File class, changing its attributes property, and saving the file?
Sysop: | fluid |
---|---|
Location: | wickliffe, ohio |
Users: | 4 |
Nodes: | 10 (0 / 10) |
Uptime: | 140:20:56 |
Calls: | 50 |
Files: | 15,838 |
Messages: | 49,859 |