Solved

Function for copying files

Posted on 1997-08-05
3
191 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 50 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to calculate times for developing software? 8 65
Process filename extension 3 172
Doc'in system (example?) BA 7 89
abstract class with all non abstract mentods 6 76
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

896 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now