Package: Ada.Directories.Information

Dependencies

pragma License (Modified_GPL);

Description

(c) Martin M. Dowie, 2003-2004

Implementation Advice

If other information about a file is available (such as the owner or creation date) in a directory entry, the implementation should provide functions in a child package Ada.Directories.Information to retrieve it.

All function can raise Status_Error if Name if not a valid Directory Entry, Name_Error if it is not valid as a file or Use_Error if it is valid but does not exist.


Header

package Ada.Directories.Information is
 

Exceptions

Not_Implemented
Can be raised by any subprogram on a given platform that does not support a specific attribute.

Other Items:

function Creation_Time (Name : in String)
   return Ada.Calendar.Time;

function Creation_Time (Name : in Directory_Entry_Type)
   return Ada.Calendar.Time;
Returns the time when the file was created.

function Is_Compressed (Name : in String)
   return Boolean;

function Is_Compressed (Name : in Directory_Entry_Type)
   return Boolean;
Returns True if the file or directory represented by Name is compressed.

function Is_Encrypted (Name : in String)
   return Boolean;

function Is_Encrypted (Name : in Directory_Entry_Type)
   return Boolean;
Returns True if the file or directory represented by Name is encrypted.

function Is_Hidden (Name : in String)
   return Boolean;

function Is_Hidden (Name : in Directory_Entry_Type)
   return Boolean;
Returns True if the file or directory represented by Name is hidden. A hidden file or directory does not appear in normal directory listings.

function Is_Not_Archived (Name : in String)
   return Boolean;

function Is_Not_Archived (Name : in Directory_Entry_Type)
   return Boolean;
Returns True if the file or directory represented by Name needs to be archived (backed-up). The value is set when the file is modified, and typically is cleared by backup programs.

function Is_Read_Only (Name : in String)
   return Boolean;

function Is_Read_Only (Name : in Directory_Entry_Type)
   return Boolean;
Returns True if the file or directory represented by Name is read-only. A read-only file cannot be written or deleted. A read-only directory cannot be deleted.

function Is_System (Name : in String)
   return Boolean;

function Is_System (Name : in Directory_Entry_Type)
   return Boolean;
Returns True if the file or directory represented by Name is a system file or directory. A system file or directory is part of the operating system.

function Last_Access_Time (Name : in String)
   return Ada.Calendar.Time;

function Last_Access_Time (Name : in Directory_Entry_Type)
   return Ada.Calendar.Time;
Returns the last time the file was accessed.
end Ada.Directories.Information;