Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Function for copying files

Posted on 1997-08-05
3
Medium Priority
?
223 Views
Last Modified: 2013-12-26
I simply want to copy an aiff file from a local hard disk to
a server. I can't locate a function to do this. Everything I've found is for creating, moving, deleting, etc, but not copying.
0
Comment
Question by:RadNetGML
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
PAD earned 200 total points
ID: 1291624
Toolbox don't have a copy routine.
Severals ways to do that :

simply open source, create destination and read source by block and wrote in dest until EOF then close. Your file is copied !

another way is to use Apple Event to tell the finder to do the copy for you... more complex but let the finder do the job and you'll have a marvellous progressing box indicating the job.
0
 
LVL 1

Expert Comment

by:PAD
ID: 1291625
Oops i forgive somehing very important with the 1st solution :
don't forget to copy the ressource fork AND the data fork (if exist) in order to make a real copy of the file...
0
 

Author Comment

by:RadNetGML
ID: 1291626
I have implemented the Open, Read, Write, Close functionality.
I have to copy more than a block at a time since the files are
large. I like the Apple Event comment, but I'm writing an extension for an app that handles all of the UI. Thanks for the
response.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question