attribute : Java Glossary

attribute
An instance or static variable, usually called a field. attribute is the term used in Eiffel and some other OO (Object Oriented) languages for field. In Meyer’s definition, there is no implication of public, but some people use the term only for public variables.

In Windows, each file has a set of attribute bits that can sometimes be changed with the attrib command.

Windows File Attributes
Attribute
Letter
Attribute
Name
Meaning
R Read-only This locks the file so that its contents cannot be changed until the read-attribute is removed. Files marked read-only are also slightly more difficult to erase. When you restore files from CD (Compact Disk), they often have the read-only attribute which you must remove before programs can use the files. In Java you can discover the state of this attribute with File. canWrite()
H Hidden This file is mildly hidden. You may optionally decide whether to include it in directory listings. Programs can still read it if they know the file’s name. You can’t discover the state of this bit in pure java. You must use JNI (Java Native Interface). Java’s File. list() ignores the hidden attribute and gives you everything, hidden and revealed.
N Normal This is a file, not a directory. This is what File. isFile() looks for.
D Directory This is a directory, not a file. This is what File. isDirectory() looks for.
S System This file belongs to the operating system, and thus it would not be wise to delete it unless you know what you are doing. You can’t discover the state of this bit in pure java. You must use JNI.
T Temporary This file is fair game for deleting. Normally such files are automatically erased when a program terminates, but when a program crashes, its temporary files may not be deleted properly. Temporary files are safe to delete. Unfortunately, many temporary files are not marked with this attribute or any other distinguishing feature. You can’t discover the state of this bit in pure java. You must use JNI. Vista does not automatically delete such files. You must run a scavenger program every once in a while to scan the disk to find and delete them.
A Archive Has this file been changed since the last backup. Primitive system to track what needs backup. It is rough indication the file has changed.
O Offline This has something to do with Microsoft’s feature to cache web content locally. I’m not sure, but I think this means the original lives on some other machine.
I not-Indexed This file or directory is not partipating in the MS FastFind indexing. I am not sure if this attribute bit will also suppress Google desktop indexing. You can remove it with attrib -i *.*.

In xml, html and jnlp, an attribute is a name="value" modifier on a tag.


CMP homejump to top You can get the freshest copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/attribute.html J:\mindprod\jgloss\attribute.html
logo
Please email your , letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email. If you want your message, your name or email kept confidential, not considered for public posting, please explicitly specify that. Unless you state otherwise, I will treat your message as a letter to the editor that I may or may not publish in the feedback section. After that, it will be too late to retract it. If you disagree with something I said, please quote it and cite the web page where you found it, tell me why you think it is wrong, and, if possible, provide some supporting evidence. Threatening to kill me or spouting obscenities has yet to persuade me to change my mind.
mindprod.com IP:[65.110.21.43]
view BlogYour face IP:[38.107.179.212]
You are visitor number 28,293.