Module: _adir Library: Clipper 5.3 This module contains the following functions and procedures: Note: Because this is raw decompiler output, the code is closer to that seen in a .PPO file, rather than a .PRG file. In other words, you must allow for the preprocessor conversions normally performed based on the contents of STD.CH and other .CH files #include "common.ch" #include "inkey.ch" //---------------------------------------------------[top]- // ADIR( Arg1, Arg2, Arg3, Arg4, Arg5, Arg6 ) // function ADIR( Arg1, Arg2, Arg3, Arg4, Arg5, Arg6 ) local Local1, Local2, Local3 := defpath() if ( SubStr(Arg1, 2, 1) == ":" .OR. SubStr(Arg1, 1, 1) == "\" ) Local3 := Arg1 else Local3 := Local3 + Arg1 endif if ( ISARRAY( Arg6 ) ) Local1 := directory(Local3, "HSD") else Local1 := directory(Local3) endif if ( ValType(Local1) != "A" ) return 0 endif Local2 := Len(Local1) if ( ISARRAY( Arg2 ) ) aeval(Arg2, { |_1, _2| Arg2[ _2 ] := Local1[ _2 ][ 1 ] }, 1, ; Local2) endif if ( ISARRAY( Arg3 ) ) aeval(Arg3, { |_1, _2| Arg3[ _2 ] := Local1[ _2 ][ 2 ] }, 1, ; Local2) endif if ( ISARRAY( Arg4 ) ) aeval(Arg4, { |_1, _2| Arg4[ _2 ] := Local1[ _2 ][ 3 ] }, 1, ; Local2) endif if ( ISARRAY( Arg5 ) ) aeval(Arg5, { |_1, _2| Arg5[ _2 ] := Local1[ _2 ][ 4 ] }, 1, ; Local2) endif if ( ISARRAY( Arg6 ) ) aeval(Arg6, { |_1, _2| Arg6[ _2 ] := Local1[ _2 ][ 5 ] }, 1, ; Local2) endif return Len(Local1) //---------------------------------------------------[top]- // DEFPATH // function DEFPATH return __defpath() //---------------------------------------------------[top]- // __DEFPATH // function __DEFPATH local Local1, Local2, Local3 := Set(_SET_DEFAULT) Local1 := Len(Local3) if ( ( Local2 := SubStr(Local3, Local1, 1), Local1 > 0 .AND. ; Local2 != ":" .AND. Local2 != "\" ) ) Local3 := Local3 + iif( Local1 == 1, ":", "\" ) endif return Local3 //---EOF Use your Browser's BACK button to return to Function Listings