Previous

Next

Bottom

Contents

Glossary

Index

 

CF1 User's Manual

DOS Directory Functions

May 1999

Revision 1.00

 Persistor Instruments Inc.
© 1998 All rights reserved.

 NOT FINALIZED!

The functions in this section exist to support new features of PicoDOS 2.0 and should be considered experimental. Even with the woefully inadequate documentation that currently exists, these may be useful to more complex applications. Be warned that unlike the finalized BIOS and PicoDOS functions, these functions are subject to much change, and you should not use them if you are not prepared to recode your projects as the functions mature.

 

Quick Reference Table

DIRFindEnd

DIRFindFirst

DIRFindNext

DIRFreeSpace

DIRGetVolumeLabel

DIRMatchName

DIRSerialNumber

DIRSetVolumeLabel

DIRTotalSpace

DIRValidChar

#define PICO_PATH_MAX   256         // maximum of 255 char in full path (+ \0)
#define PICO_NAME_MAX   13          // maximum of 12 (8.3) char in name (+ \0)

enum
    {
      dirErrorStart = DIR_ERRORS
    , dsdEndOfDir                   // reached the end of the directory
    };

DIRFindFirst -- Find first directory entry starting at path

Description

Prototype:

short DIRFindFirst(char *path, struct dirent *dp);

Definition:

#include <cf1pico.h>

Inputs:

path XXXXX
dp XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

DIRFindNext -- Find next directory entry

Description

Prototype:

short DIRFindNext(struct dirent *dp);

Definition:

#include <cf1pico.h>

Inputs:

dp XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

DIRFindEnd -- Conclude directory search

Description

Prototype:

short DIRFindEnd(struct dirent *dp);

Definition:

#include <cf1pico.h>

Inputs:

dp XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

DIRMatchName -- Return true if filename matches ambiguous pattern

Description

Prototype:

bool DIRMatchName(char *filename, char *pattern);

Definition:

#include <cf1pico.h>

Inputs:

filename XXXXX
pattern XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

DIRValidChar -- Return true if valid char for filenames

Description

Prototype:

bool DIRValidChar(char c, bool dot, bool ambig);

Definition:

#include <cf1pico.h>

Inputs:

c XXXXX
dot XXXXX
ambig XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

DIRFreeSpace -- Return free space on specified drive

Description

Prototype:

long DIRFreeSpace(char *drive);

Definition:

#include <cf1pico.h>

Inputs:

drive XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

DIRTotalSpace -- Return total space on specified drive

Description

Prototype:

long DIRTotalSpace(char *drive);

Definition:

#include <cf1pico.h>

Inputs:

drive XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

DIRSerialNumber -- Return the drives serial number

Description

Prototype:

ulong DIRSerialNumber(char *drive);

Definition:

#include <cf1pico.h>

Inputs:

drive XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

DIRGetVolumeLabel -- Return the drives volume label

Description

Prototype:

char DIRGetVolumeLabel(char *drive);

Definition:

#include <cf1pico.h>

Inputs:

drive XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

DIRSetVolumeLabel -- Set the drives volume label

Description

Prototype:

short DIRSetVolumeLabel(short logdrv, char *label);

Definition:

#include <cf1pico.h>

Inputs:

logdrv XXXXX
label XXXXX

Returns:

XXXXX

Notes:

XXXXX

Timing:

TBD

 

Previous

Next

Top

Contents

Glossary

Index

Tel: 508-759-6434

Fax: 508-759-6436

Copyright (C) 1998 Persistor Instruments Inc. - All Rights Reserved