au.com.prunge.jgenfile.metadata
Interface CommonKeys


public interface CommonKeys

A collection of commonly used metadata keys.

This interface has constants representing commonly used keys for metadata access.

Version:
1.0
Author:
Peter Runge

Field Summary
static MetadataKey AVAILABLE_SPACE
          A key for accessing the number of bytes available for usage by files.
static MetadataKey DATE_ACCESSED
          A key for accessing the date and time a file was last accessed.
static MetadataKey DATE_CREATED
          A key for accessing the date and time a file was created.
static MetadataKey DATE_MODIFIED
          A key for accessing the date and time a file was last modified.
static MetadataKey HIDDEN
          A key for checking or setting whether a file is hidden.
static MetadataKey READ_ONLY
          A key for checking or setting whether a file is read-only.
static MetadataKey SYSTEM
          A key for checking or setting whether a file is marked as a 'system' file.
 

Field Detail

DATE_MODIFIED

public static final MetadataKey DATE_MODIFIED
A key for accessing the date and time a file was last modified. This key's values are java.util.Date objects.

The underlying file system may not store this value with millisecond precision. Therefore do not expect that after setting the last modified date of an item you will get that exact date back.


DATE_CREATED

public static final MetadataKey DATE_CREATED
A key for accessing the date and time a file was created. This key's values are java.util.Date objects.

The underlying file system may not store this value with millisecond precision. Therefore do not expect that after setting the last modified date of an item you will get that exact date back.


DATE_ACCESSED

public static final MetadataKey DATE_ACCESSED
A key for accessing the date and time a file was last accessed. This key's values are java.util.Date objects.

The underlying file system may not store this value with millisecond precision. Therefore do not expect that after setting the last modified date of an item you will get that exact date back.


AVAILABLE_SPACE

public static final MetadataKey AVAILABLE_SPACE
A key for accessing the number of bytes available for usage by files. This key's values are Long objects.

Available space metadata will usually be available for directories, and will be affected by the amount of free disk space and any disk usage quotas that are in effect. It is possible however that files themselves have space quotas imposed on them therefore making files in the same directory return different values for this key.

Values returned for this key are just a recommendation and may not be completely accurate. It is not guarenteed that creating a file of x bytes in length will decrease the value returned using this key by x bytes. Things such as data compression and disk allocation can affect the accuracy of values returned by this key.


READ_ONLY

public static final MetadataKey READ_ONLY
A key for checking or setting whether a file is read-only. This key's values are Boolean objects.

Values for this key may have different effects in different file systems. For example, it might be possible to delete a read-only file in one file system, and not possible to do so in another.


HIDDEN

public static final MetadataKey HIDDEN
A key for checking or setting whether a file is hidden. This key's values are Boolean objects.

Values for this key may have different effects in different file systems. For example, in UNIX environments any file beginning with a period may be regarded as read-only. In Windows environments this setting can be different for each file.


SYSTEM

public static final MetadataKey SYSTEM
A key for checking or setting whether a file is marked as a 'system' file. This key's values are Boolean objects.

System files are typically part of the operating system. System files may not be modifiable. Warnings could be issued to users who are attempting to modify or delete a system file.