2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
6 #include <proto/arossupport.h>
8 #include <proto/utility.h>
10 #include <aros/system.h>
13 #include <dos/dosextens.h>
14 #include <exec/types.h>
15 #include <utility/utility.h>
17 #define BUFFER_SIZE 100
19 /*****************************************************************************
34 There is a need in file/directory processing where an application
35 may need to determine whether a path is just a volume/device or
40 Name - The path to test.
42 Flags - Any combination of the following:
50 Boolean True or False.
54 Requires the programmer to open the utility.library and initialise
57 In future releases the buffer size will be set via a taglist.
65 Success = IsDosEntryA("Work:", LDF_VOLUMES)
81 27-Jul-1997 laguest Initial inclusion into the AROS tree
83 ******************************************************************************/
85 struct DosList
*DList
;
90 char Buffer
[BUFFER_SIZE
+ 1];
94 Position
= SplitName(Name
, ':', &Buffer
[0], 0, BUFFER_SIZE
+ 1);
95 if (Position
!= -1 && Name
[Position
] == NULL
)
97 DList
= AttemptLockDosList(Flags
| LDF_READ
);
100 DList
= NextDosEntry(DList
, Flags
);
101 while (DList
!= NULL
&& ReturnValue
== FALSE
)
103 DLName
= AROS_BSTR_ADDR(DList
->dol_Name
);
105 Success
= Strnicmp(DLName
, &Buffer
[0], Position
- 1);
111 DList
= NextDosEntry(DList
, Flags
);
114 UnLockDosList(Flags
| LDF_READ
);
118 return (ReturnValue
);