/******************************************************************************
 SyGDirUtil.h

	Utility functions for dealing with directories.

	Copyright © 1996 by Glenn W. Bach. All rights reserved.

 ******************************************************************************/

#ifndef _H_SyGDirUtil
#define _H_SyGDirUtil

#include <jTypes.h>
#include <JString.h>

enum JMoveError
{
	kNoMoveError = 0,
	kMoveAccessDenied,
	kNameAlreadyExists,
	kMoveComponentNotDir,
	kMoveBadPath,
	kMoveDirNotEmpty,
	kMoveDirBusy,
	kDeviceFull,
	kAcrossFileSystem,
	kMoveUnknownError
};

JMoveError gRenameDirEntry(const JCharacter* oldName, const JCharacter* newName);
JBoolean SystemCall(const JString& sysCmd, const JBoolean report = kTrue);
JBoolean gMove(const JCharacter* src, const JCharacter* dest, 
				const JBoolean force, JBoolean* nextForce, JBoolean* firstCheck);
void gRemove(const JCharacter* src);
JBoolean gCopy(const JCharacter* src, const JCharacter* dest, 
				const JBoolean force, JBoolean* nextForce, JBoolean* firstCheck);
void gDelete(const JCharacter* src);

#endif
