Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pyfs
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
pyfs
Commits
064714ca
Commit
064714ca
authored
Sep 19, 2008
by
willmcgugan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweaks
parent
44893ed8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
fs/utils.py
+2
-4
No files found.
fs/utils.py
View file @
064714ca
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
import
shutil
import
shutil
from
mountfs
import
MountFS
from
mountfs
import
MountFS
def
copyfile
(
src_fs
,
src_path
,
dst_fs
,
dst_path
,
chunk_size
=
1
024
*
16
):
def
copyfile
(
src_fs
,
src_path
,
dst_fs
,
dst_path
,
chunk_size
=
1
6384
):
"""Copy a file from one filesystem to another. Will use system copyfile, if both files have a syspath.
"""Copy a file from one filesystem to another. Will use system copyfile, if both files have a syspath.
Otherwise file will be copied a chunk at a time.
Otherwise file will be copied a chunk at a time.
...
@@ -42,8 +42,7 @@ def copyfile(src_fs, src_path, dst_fs, dst_path, chunk_size=1024*16):
...
@@ -42,8 +42,7 @@ def copyfile(src_fs, src_path, dst_fs, dst_path, chunk_size=1024*16):
dst
.
close
()
dst
.
close
()
def
movefile
(
src_fs
,
src_path
,
dst_fs
,
dst_path
,
chunk_size
=
1024
*
16
):
def
movefile
(
src_fs
,
src_path
,
dst_fs
,
dst_path
,
chunk_size
=
16384
):
"""Move a file from one filesystem to another. Will use system copyfile, if both files have a syspath.
"""Move a file from one filesystem to another. Will use system copyfile, if both files have a syspath.
Otherwise file will be copied a chunk at a time.
Otherwise file will be copied a chunk at a time.
...
@@ -54,7 +53,6 @@ def movefile(src_fs, src_path, dst_fs, dst_path, chunk_size=1024*16):
...
@@ -54,7 +53,6 @@ def movefile(src_fs, src_path, dst_fs, dst_path, chunk_size=1024*16):
chunk_size -- Size of chunks to move if system copyfile is not available (default 16K)
chunk_size -- Size of chunks to move if system copyfile is not available (default 16K)
"""
"""
src_syspath
=
src_fs
.
getsyspath
(
src_path
,
default
=
""
)
src_syspath
=
src_fs
.
getsyspath
(
src_path
,
default
=
""
)
dst_syspath
=
dst_fs
.
getsyspath
(
dst_path
,
default
=
""
)
dst_syspath
=
dst_fs
.
getsyspath
(
dst_path
,
default
=
""
)
...
...
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