Version 0.1 alpha, Copyright ©1994 by Simson L. Garfinkel. All Rights Reserved.
Georg Tuparev -- 11.12.1994.
MiscDirectory |
Inherits From: | Object | |
Declared In: | MiscDirectory.h |
Class Description |
This class is in very preliminary stage. The idea and the first version of the class are from Simson Garfinkel. I slightly
modified the source and added a new sort method (currently sorting only by name). This class may be used separately
from all other classes included in the current version of MiscKit. That's the reason, why all the methods return values
from type const char * and no MiscString. Returning MiscString is in general bad idea for low level classes, so in the
future, I will keep the return values unchanged.
Note: TO DO! |
Instance Variables |
List * | fileNameList; | |
int | currentEntry; | |
char * | dirName; | |
char * | filetype; | |
fileNameList | ![]() | |
currentEntry | ![]() | |
dirName | ![]() | |
filetype | ![]() |
Method Types |
Initializing the class | + initialize | |
Creating and freeing instances | - init |
- free |
Setting global behavior | - setFileType: |
- sortDir |
Information about current entry | - entry |
- extension - fullPathName |
Movement | - nextEntry |
- rewind |
Information about directory | - matchingEntries | |
Archiving a MiscDirectory | - read: - write: |
Class Methods |
initialize |
+ initialize |
Initializes the class instance doing things like setting the version number.
See also: - initialize (Object) |
Instance Methods |
entry |
- (const char *)entry |
Returns the current entry (with extension) or NULL.
See also: - nextEntry, - fullPathName, - extension extension |
- (const char *)extension |
Returns the current entry's extension or NULL.
See also: - nextEntry, - fullPathName, - entry free |
- free |
Frees the MiscDirectory object.
See also: - free (Object) fullPathName |
- (const char *)fullPathName |
Returns the full path of the current entry (with extension) or NULL.
See also: - nextEntry, - fullPathName, - entry initForDirectory |
- initForDirectory:(const char *)dirname |
Initializes the directory object.
See also: - initialize (Object) matchingEntries |
- (int)matchingEntries |
Returns the number of entries in the directory object.
nextEntry |
- (const char *)nextEntry |
Increments the directory pointer to the next entry with matching file extension (if possible) and returns the new
directory entry or NULL.
See also: - entry, - fullPathName, - extension, - rewind, - setFileType read |
- read:(NXTypedStream *)stream |
Reads the object from the typed stream.
See also: - read: (Object) rewind |
- rewind |
Rewind the directory. The current entry (the first in the list) may have an extension different then the one, set by the
setFileType: method. This behavior will be fixed in the next version
See also: - nextEntry setFileType |
- setFileType:(const char *)filetype |
Sets the search file extension.
See also: - initialize (Object) sortDir |
- sortDir |
Sorts the directory by name
See also: - initialize (Object) write |
- write:(NXTypedStream *)stream |
Writes the object to the typed stream.
See also: - write (Object) |