summaryrefslogtreecommitdiffstats
path: root/pym/portage/util/_async/FileCopier.py
blob: 27e5ab4c04c26b06b4e465aca11461cae835f919 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Copyright 2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

from portage import os
from portage import shutil
from portage.util._async.ForkProcess import ForkProcess

class FileCopier(ForkProcess):
	"""
	Asynchronously copy a file.
	"""

	__slots__ = ('src_path', 'dest_path')

	def _run(self):
		shutil.copy(self.src_path, self.dest_path)
		return os.EX_OK