Copy contents of a directory src to a directory dest. If a file in src already exists in dest then the one in dest will be blindly overwritten.

NOTE: the source directory cannot change while this method is running. Otherwise the results are undefined and you could easily hit a FileNotFoundException.

NOTE: this method only copies files that look like index files (ie, have extensions matching the known extensions of index files).

Namespace: Lucene.Net.Store
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
public static void Copy(
	Directory src,
	Directory dest,
	bool closeDirSrc
)
Visual Basic
Public Shared Sub Copy ( _
	src As Directory, _
	dest As Directory, _
	closeDirSrc As Boolean _
)
Visual C++
public:
static void Copy(
	Directory^ src, 
	Directory^ dest, 
	bool closeDirSrc
)

Parameters

src
Type: Lucene.Net.Store..::..Directory
source directory
dest
Type: Lucene.Net.Store..::..Directory
destination directory
closeDirSrc
Type: System..::..Boolean
if
CopyC#
true
, call {@link #Close()} method on source directory

See Also