On Mar 28, 2012, at 7:21 PM, Jens Alfke wrote:
> On Mar 27, 2012, at 1:50 PM, Rick Mann wrote:
>
>> if ([fm fileExistsAtPath: url.absoluteString])
>
> This line seems wrong. It should be using the .path property instead of
> .absoluteString.
Or better yet, just use the (unfortunately verbos
On Mar 28, 2012, at 17:21 , Jens Alfke wrote:
>
> On Mar 27, 2012, at 1:50 PM, Rick Mann wrote:
>
>>if ([fm fileExistsAtPath: url.absoluteString])
>
> This line seems wrong. It should be using the .path property instead of
> .absoluteString. The latter is the entire URL, including the sch
On Mar 27, 2012, at 1:50 PM, Rick Mann wrote:
>if ([fm fileExistsAtPath: url.absoluteString])
This line seems wrong. It should be using the .path property instead of
.absoluteString. The latter is the entire URL, including the scheme and the
colon, which is not going to be a real filesyste
On 27 Mar 2012, at 22:23, Rick Mann wrote:
>> There are a couple other issues:
>>
>> 1) You shouldn't handle errors by testing (err != nil). This might work
>> (since you initialized err to nil) assuming that removeItemAtURL: isn't
>> fiddling with err anyway, but it's not guaranteed. The pref
> Okay, I made that change, but it seems blatantly incorrect to create an error
> return if it is also going to return true.
It only returns you something if it says it did, by indicating that an error
occurred. Otherwise, the contents of the error parameter are undefined.
There are definitely
Rick Mann wrote:
> The file is generated and deleted by code; it's the same string passed
> around, at least certainly in the existence check just before the attempted
> delete. Surely that existence check would fail, too?
Not necessarily. The problem with patterns like "check if transient reso
On Mar 27, 2012, at 2:23 PM, Rick Mann wrote:
>
> On Mar 27, 2012, at 14:16 , Conrad Shultz wrote:
>
>> As David already pointed out you should probably be using file URLs.
>
> I made that change, and it behaves the same way. Even so, I don't see why
> that particular difference would allow it
On Mar 27, 2012, at 14:16 , Conrad Shultz wrote:
> As David already pointed out you should probably be using file URLs.
I made that change, and it behaves the same way. Even so, I don't see why that
particular difference would allow it to work on the sim and not on the device.
> There are a co
On 3/27/12 1:50 PM, Rick Mann wrote:
>
> On Mar 27, 2012, at 12:05 , Mike Abdullah wrote:
>
>> Show us some code.
>
> NSURL* url = [NSURL URLWithString: ci.diskURI];
> if ([fm fileExistsAtPath: url.absoluteString])
> {
> NSLog(@"File exists: %@", url.absoluteString);
> }
On Mar 27, 2012, at 1:50 PM, Rick Mann wrote:
>NSURL* url = [NSURL URLWithString: ci.diskURI];
Does ci.diskURI include the "file://" prefix or is it just a path? If the
latter, then you should be using +fileURLWithString:.
--
David Duncan
___
Co
On Mar 27, 2012, at 12:05 , Mike Abdullah wrote:
> Show us some code.
NSURL* url = [NSURL URLWithString: ci.diskURI];
if ([fm fileExistsAtPath: url.absoluteString])
{
NSLog(@"File exists: %@", url.absoluteString);
}
NSError* err = nil;
[fm removeItemAtURL: ur
Show us some code.
On 27 Mar 2012, at 19:47, Rick Mann wrote:
> The file is generated and deleted by code; it's the same string passed
> around, at least certainly in the existence check just before the attempted
> delete. Surely that existence check would fail, too?
>
> --
> Rick
>
> On Mar
The file is generated and deleted by code; it's the same string passed around,
at least certainly in the existence check just before the attempted delete.
Surely that existence check would fail, too?
--
Rick
On Mar 27, 2012, at 11:31 , Roland King wrote:
> and the fact it works on the sim and
and the fact it works on the sim and not on the device makes me think you have
a case issue, device is case sensitive, sim is not.
On Mar 28, 2012, at 2:15 AM, Mike Abdullah wrote:
> Well error code 4 is NSFileNoSuchFileError. I think you're trying to delete a
> file that doesn't exist!
>
> O
Yet, I check for the existence of the file before to verify its there, as you
can see in the output.
Sent from my iPhone
On Mar 27, 2012, at 11:15, Mike Abdullah wrote:
> Well error code 4 is NSFileNoSuchFileError. I think you're trying to delete a
> file that doesn't exist!
>
> On 27 Mar 2
Well error code 4 is NSFileNoSuchFileError. I think you're trying to delete a
file that doesn't exist!
On 27 Mar 2012, at 03:22, Rick Mann wrote:
> I'm trying to delete some image files I cache. Here's what I'm getting:
>
> 2012-03-26 19:20:14.330 MyApp[5765:707] File exists:
> /var/mobile/App
I'm trying to delete some image files I cache. Here's what I'm getting:
2012-03-26 19:20:14.330 MyApp[5765:707] File exists:
/var/mobile/Applications/6BBF21B1-97B3-4016-88B0-FE1C18D736D7/Library/Caches/Images/4149/5414582865_932fac9c82_b.jpg
2012-03-26 19:20:14.332 MyApp[5765:707] Unable to dele
17 matches
Mail list logo