Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
776f7781
Commit
776f7781
authored
Sep 22, 2000
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow lists of files/fsspecs as the source for copy() and move(). By
Bill Bedford, slightly edited by me.
parent
b6ec1f65
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
Mac/Lib/findertools.py
Mac/Lib/findertools.py
+12
-2
No files found.
Mac/Lib/findertools.py
View file @
776f7781
...
@@ -32,6 +32,11 @@ def Print(file):
...
@@ -32,6 +32,11 @@ def Print(file):
def
copy
(
src
,
dstdir
):
def
copy
(
src
,
dstdir
):
"""Copy a file to a folder"""
"""Copy a file to a folder"""
finder
=
_getfinder
()
finder
=
_getfinder
()
if
type
(
src
)
==
type
([]):
src_fss
=
[]
for
s
in
src
:
src_fss
.
append
(
macfs
.
FSSpec
(
s
))
else
:
src_fss
=
macfs
.
FSSpec
(
src
)
src_fss
=
macfs
.
FSSpec
(
src
)
dst_fss
=
macfs
.
FSSpec
(
dstdir
)
dst_fss
=
macfs
.
FSSpec
(
dstdir
)
return
finder
.
duplicate
(
src_fss
,
to
=
dst_fss
)
return
finder
.
duplicate
(
src_fss
,
to
=
dst_fss
)
...
@@ -39,6 +44,11 @@ def copy(src, dstdir):
...
@@ -39,6 +44,11 @@ def copy(src, dstdir):
def
move
(
src
,
dstdir
):
def
move
(
src
,
dstdir
):
"""Move a file to a folder"""
"""Move a file to a folder"""
finder
=
_getfinder
()
finder
=
_getfinder
()
if
type
(
src
)
==
type
([]):
src_fss
=
[]
for
s
in
src
:
src_fss
.
append
(
macfs
.
FSSpec
(
s
))
else
:
src_fss
=
macfs
.
FSSpec
(
src
)
src_fss
=
macfs
.
FSSpec
(
src
)
dst_fss
=
macfs
.
FSSpec
(
dstdir
)
dst_fss
=
macfs
.
FSSpec
(
dstdir
)
return
finder
.
move
(
src_fss
,
to
=
dst_fss
)
return
finder
.
move
(
src_fss
,
to
=
dst_fss
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment