class OrderedFileName

Members of this class hold the name of a file, where the format is <numeric order>. More...

Definition#include <sysadm/OrderedFileName.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Static Methods


Detailed Description

Members of this class hold the name of a file, where the format is <numeric order>.<alphanumeric file name>. For example:

1000.File1 3000.File2 File3 3000

Members are sorted as follows: If there is no '.' in the file name, consider the <numeric order> field to be empty. Sort the list by using strcmp on the <numeric order> field, then on the <alphanumeric file name> as a secondary key.

OrderedFileName**  createOrderedFileNamesFromDir ( const char* dirName)

[static]

Return a sorted array of pointers to OrderedFileNames, constructed from all of the files in a directory. The array is terminated by a NULL entry. Use the destroyOrderedFileNameList method to clean up the value returned. If the directory doesn't exist, then this will return NULL.

void  destroyOrderedFileNameList (OrderedFileName** list)

[static]

Cleans up the sorted array of pointers to OrderedFileNames returned by createOrderedFileNamesFromDir.

char *  getOrder ()

Gets the order portion of the name

char *  getName ()

Gets the alphanumeric file name portion of the name

char *  getFileName ()

Gets the entire filename

char *  getFullPath ()

Gets the fully qualified name of the file, starting from /


Generated by: rusty@irem on Mon Sep 18 18:07:52 2000, using kdoc 2.0a36.