Wiki Home >> SIO-Command-$F7-Open-Directory

SIO-Command-$F7-Open-Directory


This is a command for Device $70 - The FujiNet Device itself (see SIO-Commands-for-Device-ID-$70).

Open Directory ($F7)

Description

Opens directory for reading, resets directory pointer to beginning of directory. Subsequently, calls to Read Directory can be called to get directory entries, and calls to Close Directory can be used to close the handle to the directory.

DAUX1 specifies the host slot to perform the open directory function on.

A wildcard pattern may be specified following the directory path and a NULL.

DAUX2 specifies directory options.

Parameters

DCBValue
DDEVIC$70
DUNIT$01
DCOMND$F7
DSTATS$80
DBUFPointer to 256 bytes containing directory path, NULL terminated. Optionally followed by wildcard pattern, NULL terminated.
DTIMLO$0F
DBYT256
DAUX1Host slot to perform directory operation on
DAUX2DIROPT options (see below)
DIROPTBitDescription
DIROPT_DESCEND0x01Results are sorted in descending order
DIROPT_TIME0x02Results are sorted by time, not name

Examples

CC65

unsigned char path[256]="/";
unsigned short host_slot=0;

// Open Dir
OS.dcb.ddevic=0x70;
OS.dcb.dunit=1;
OS.dcb.dcomnd=0xF7;
OS.dcb.dstats=0x80;
OS.dcb.dbuf=&path;
OS.dcb.dtimlo=0x0F;
OS.dcb.dbyt=256;
OS.dcb.daux=host_slot;
siov();

See Also

  • Read Directory
  • Close Directory

Wiki content is mirrored from the FujiNet Github Wiki