attribute : Java Glossary

go to home page A words local find full screen, hide local find menu Google search web for more information on this topic jump to foot of page translate this page with Babelfish punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all) ©1996-2009 Roedy Green, Canadian Mind Products
attribute
An instance or static variable, usually called a field. attribute is the term used in Eiffel and some other OO 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, 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’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
CMP logofeedback Please email your feedback for publication, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email
mindprod.com IP:[65.110.21.43]
view BlogYour face IP:[38.107.191.106]
You are visitor number 17,826.