on 2012-12-21 at 23:20 Neil Bothwick wrote:

> No, and there's a good reason for that.

well, i'm glad to know that there's a good reason to use MTP, because what
i've read so far about it made me wonder...

from the link mark sent earlier:

<quote>
libmtp (and I assume the MTP protocol itself) doesn’t support seeking
within a file or partial file reads or writes. You have to fetch or send
the entire file. To simluate normal random access files, when a file is
opened the entire file contents are copied from the device to a temporary
file. Reads and writes then operate on the temporary file. When the file
is closed (or if a flush or fsync occurs) then if a write has occurred
since the file was last opened the entire contents of the temporary file
are sent back to the device. This means repeatedly opening a file, making
a small change, and closing it again will be very slow.

Renaming or moving a file is implemented by copying the file from the
device, writing it back to the device under the new name, and then
deleting the original file. This makes renames, especially for large
files, slow. This has special significance when using rsync to copy files
to the device. Rsync copies to a temporary file, and then when the copy is
complete it renames the temporary file to the real filename. So when
rsyncing to a jmtpfs filessystem, for each file, the data gets copied to
the device, read back, and then copied to the device again. There is a
true rename (but not move) supported by libmtp, but this appears to
confuse some Android apps, so I don’t use it. Image files, for example,
will disappear from the Gallery if they’re renamed.
</quote>

Reply via email to