realbasic-nug
[Top] [All Lists]

Temp File Rename fails

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Temp File Rename fails
From: Kevin Windham <kevo at gatorgraphics dot com>
Date: Sun, 30 May 2004 23:06:55 -0500
Delivered-to: realbasic-nug at lists dot realsoftware dot com
List-help: <mailto:realbasic-nug-request@lists.realsoftware.com?subject=help>
List-id: REALbasic NUG <realbasic-nug.lists.realsoftware.com>
List-post: <mailto:realbasic-nug@lists.realsoftware.com>
I am trying to rename a file and it is failing. I noticed that the docs say a temporary file can't be renamed.

What I am doing is storing received data in a temporary file created with GetTemporaryFolderItem. After the data is received, I move the file to a non-temporary location and then I want to give it a proper name. Why is the file still considered temporary if I move it. I can rename it fine in the Finder.

Is there something about this scenario that is "improper", or is this just the way it works, and temporary files should never become permanent?

What I would like to do is be able to create a temporary file to store the data in so that if the transfer fails, the file can disappear gracefully and not clutter up the final storage location if the transfer succeeds. I could just go ahead and start writing the file to the final location, but I thought this way would be more elegant since the file will only show up there if the transfer succeeds.

Any advice?

TIA,
Kevin

_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>