Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Side by Side Diff: experimental/PdfViewer/copy_files.py

Issue 22900010: pdfviewer: check in pdfapi classes (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « experimental/PdfViewer/autogen.txt ('k') | experimental/PdfViewer/datatypes.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 import os
2 import shutil
3 import sys
4
5 def copyfile(src, dst):
6 fsrc = None
7 fdst = None
8 try:
9 fsrc = open(src, 'rb')
10 fdst = open(dst, 'wb')
11 shutil.copyfileobj(fsrc, fdst)
12 finally:
13 if fdst:
14 fdst.close()
15 if fsrc:
16 fsrc.close()
17
18 dstdir = sys.argv[1]
19
20 if not os.path.exists(dstdir):
21 os.makedirs(dstdir)
22
23 for i in range(2, len(sys.argv)):
24 copyfile(sys.argv[i], os.path.join(dstdir, os.path.basename(sys.argv[i])))
25
OLDNEW
« no previous file with comments | « experimental/PdfViewer/autogen.txt ('k') | experimental/PdfViewer/datatypes.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698