Design Pattern Examples
Overview of object-oriented design patterns
FileDirEntry Class Reference

Base class representing a File or Directory entry. More...

Inheritance diagram for FileDirEntry:
Inheritance graph
Collaboration diagram for FileDirEntry:
Collaboration graph

Public Member Functions

 FileDirEntry ()
 Default constructor.
 

Properties

virtual FileDirTypes FileDirType [get, protected set]
 The type of this entry as represented by a value from the FileDirTypes enumeration.
 
virtual string Name [get, protected set]
 The name of this entry.
 
virtual long Length [get, protected set]
 The length in bytes of this entry. Directory entries are the sum of the length of all children.
 
virtual DateTime WhenModified [get, protected set]
 When this entry was last modified.
 
virtual ? FileDirEntry[] Children [get]
 The children of this entry. Is null if the entry can never have any children (that is, it isn't a container of other entries).
 

Detailed Description

Base class representing a File or Directory entry.

The program treats the File and Directory entries as this base class.

Definition at line 36 of file Composite_FileDirEntry.cs.

Constructor & Destructor Documentation

◆ FileDirEntry()

FileDirEntry ( )
inline

Default constructor.

Definition at line 91 of file Composite_FileDirEntry.cs.

References FileDirEntry.FileDirType, FileDirEntry.Length, FileDirEntry.Name, and FileDirEntry.WhenModified.

Property Documentation

◆ Children

virtual ? FileDirEntry [] Children
get

The children of this entry. Is null if the entry can never have any children (that is, it isn't a container of other entries).

Definition at line 80 of file Composite_FileDirEntry.cs.

Referenced by Composite_FileAccess._FindEntry(), and Composite_Exercise.Composite_Exercise_FormatEntry().

◆ FileDirType

virtual FileDirTypes FileDirType
getprotected set

The type of this entry as represented by a value from the FileDirTypes enumeration.

Definition at line 42 of file Composite_FileDirEntry.cs.

Referenced by Composite_Exercise.Composite_Exercise_FormatEntry(), DirEntry.DirEntry(), FileDirEntry.FileDirEntry(), and FileEntry.FileEntry().

◆ Length

virtual long Length
getprotected set

The length in bytes of this entry. Directory entries are the sum of the length of all children.

Definition at line 61 of file Composite_FileDirEntry.cs.

Referenced by Composite_FileAccess._FindEntry(), Composite_Exercise.Composite_Exercise_FormatEntry(), FileDirEntry.FileDirEntry(), and FileEntry.FileEntry().

◆ Name

◆ WhenModified

virtual DateTime WhenModified
getprotected set

The documentation for this class was generated from the following file: