Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
06033198
Kaydet (Commit)
06033198
authored
Mar 12, 1996
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use MacOS.openrf (if it is available) for opening resource forks
Copy in .5Mb chunks in stead of 1Mb
üst
db9ff36a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
macostools.py
Mac/Lib/macostools.py
+9
-3
No files found.
Mac/Lib/macostools.py
Dosyayı görüntüle @
06033198
...
@@ -8,12 +8,18 @@ import macfs
...
@@ -8,12 +8,18 @@ import macfs
import
Res
import
Res
import
os
import
os
from
MACFS
import
*
from
MACFS
import
*
import
MacOS
try
:
openrf
=
MacOS
.
openrf
except
AttributeError
:
# Backward compatability
openrf
=
open
Error
=
'macostools.Error'
Error
=
'macostools.Error'
FSSpecType
=
type
(
macfs
.
FSSpec
(
':'
))
FSSpecType
=
type
(
macfs
.
FSSpec
(
':'
))
BUFSIZ
=
0x
100000
# Copy in 1
Mb chunks
BUFSIZ
=
0x
80000
# Copy in 0.5
Mb chunks
#
#
# Not guaranteed to be correct or stay correct (Apple doesn't tell you
# Not guaranteed to be correct or stay correct (Apple doesn't tell you
...
@@ -64,8 +70,8 @@ def copy(src, dst, createpath=0):
...
@@ -64,8 +70,8 @@ def copy(src, dst, createpath=0):
ifp
.
close
()
ifp
.
close
()
ofp
.
close
()
ofp
.
close
()
ifp
=
open
(
srcfss
.
as_pathname
(),
'*rb'
)
ifp
=
open
rf
(
srcfss
.
as_pathname
(),
'*rb'
)
ofp
=
open
(
dstfss
.
as_pathname
(),
'*wb'
)
ofp
=
open
rf
(
dstfss
.
as_pathname
(),
'*wb'
)
d
=
ifp
.
read
(
BUFSIZ
)
d
=
ifp
.
read
(
BUFSIZ
)
while
d
:
while
d
:
ofp
.
write
(
d
)
ofp
.
write
(
d
)
...
...
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