From: sgibier@mail.dotcom.fr (Stephane Gibier)
Hello,
If you want to manage directories under Win32, here are MkDir and
RmDir functions :
// TOOLS.S
// _______
#ifdef WIN32
#define NULL 0
// MkDir : create a new directory "fn"
// ___________________________________
#ifdef TOOLS_MKDIR
dll ""
integer proc CreateDirectory( string s : cstrval, integer n )
: "CreateDirectoryA"
end
integer proc MkDir( string fn )
return ( CreateDirectory( fn, NULL ) )
end
#endif
// RmDir : remove an existing directory "fn"
// _________________________________________
#ifdef TOOLS_RMDIR
dll ""
integer proc RemoveDirectory( string s : cstrval )
: "RemoveDirectoryA"
end
integer proc RmDir( string fn )
return ( RemoveDirectory( fn ) )
end
#endif
#endif
So, when you want to use MkDir or RmDir, add #define TOOLS_MKDIR or
#define TOOLS_RMDIR in your SAL source and enjoy. It works great and
quicker than a Dos() command.
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)
|