• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ftp file busy?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ftp file busy?


  • Subject: Re: ftp file busy?
  • From: Aaron Jacobs <email@hidden>
  • Date: Mon, 7 Aug 2006 22:40:11 -0700

The FTP protocol itself may not have such a concept, but it is possible that the FTP daemon which is writing to the files may flag them as such, no? Or the operating system, which realizes that they are open for writing by the FTP daemon process?

A huge kludge would be to check the file size once and then again a few seconds later, if that is feasible for your application, and see if it has changed. But if you know in advance that they are going to be JPEGs, you may as well just parse them. That will have the added advantage of weeding out (some kinds of) corrupt files.


I have an application in which it monitors a particular folder for new files and processes them. In one particular case, the files are being sent to the folder via FTP - I'm checking to see if the files are busy (NSFileBusy) before trying to read them, but in the case of FTP, it says they aren't busy. Is there another way to check for an incomplete file for the FTP case? These are actually JPEG image files, so one option is to parse the headers, get the image dimensions and compare to the file size - but I was hoping there was an easier way to handle this. Thanks.

FTP doesn't have any concept of "file in use". Parse away.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: ftp file busy?
      • From: Chris Suter <email@hidden>
References: 
 >ftp file busy? (From: Jeff Schindler <email@hidden>)
 >Re: ftp file busy? (From: Andrew Farmer <email@hidden>)

  • Prev by Date: Re: Core data search and spotlight importer question
  • Next by Date: Re: ftp file busy?
  • Previous by thread: Re: ftp file busy?
  • Next by thread: Re: ftp file busy?
  • Index(es):
    • Date
    • Thread