Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!usc!ucsd!ucbvax!UTCVM.BITNET!JWANKERL From: JWANKERL@UTCVM.BITNET ("Josef W. Wankerl") Newsgroups: comp.sys.apple Subject: GS/OS file copying Message-ID: <8911181612.AA15334@apple.com> Date: 18 Nov 89 15:50:14 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 43 I am in the process of writing a program in assembly language that will be able to copy GS/OS extended files. I want to be able to copy either the data fork, resource fork, or both. I've run into a blank wall on a few major points so I'm about to list a few technical questions. Oh yeah, my GS/OS reference book is not the Apple one(s), it's Gary Litle's Exploring Apple GS/OS and ProDOS 8. So here are a few questions: * How would I go about allocating memory for the copy? I have an idea to find the maximum block size and if it's not enough then compact memory and try again, and if it's still not enough then I'll have to ask for the new maximum block size and then read in chunks of that size. I haven't done this yet because I think there might be a beter way. Is there? * How do I actually copy the file? I seem to remember a few messages back an algorithm to OPEN source file data READ source file data CREATE target file Write target file data CLOSE source file data OPEN source file resource READ source file resource CLOSE source file resource OPEN target file resource WRITE target file resource SETFILEINFO on target file CLOSE target resource CLOSE target data. Is that even close? I think I remember you have to have the target file open and set the file attributes when it's open because when it is closed on an AppleTalk drop folder then it's not accessable anymore. Will my algorithm work correctly? If you know the answers to any or all of the above questions, please let me know as I'm anxious to finish up my project and move on to another part of it. Oh yes, one more question before I go (not related to file copying) * Is there a method for a NDA to open some windows that are controlled by the NDA? I don't believe I've ever seen this done before so I'm not sure if it can be. I guess I'd have to make the window a system window but I'm now sure how things would react if the application it's running under closes it. Any answers to this one, either? -Gonzo /**********************************************************************\ |* Joe "Gonzo" Wankerl |*| The views expressed here are *| |* BITNET => JWANKERL@UTCVM |*| not necessarily yours... *| |* |*| ...but they should be. *| \**********************************************************************/