Hope this helps: 
http://code.google.com/p/cogegplreader/source/browse/trunk/CoGeGPLReaderPlugIn.m#136

On Oct 30, 2010, at 10:18 PM, bernardo amorim wrote:

> hi list.
> the title says it all
> i wanna put a NSString to save a file in a custom Patch for Quartz Composer, 
> though i allready implemented full paths and tilted paths i cannot implement 
> relative paths... ( i would just input the filename and extension and it 
> would save to disk in the directory o the composition...
> sorry if this is trivial...
> 
> my thing:
> 
>               if([path length] != 0)
>               {
>                       // is it an absolute path?  if so, don't do anything
>                       if([path characterAtIndex:0] != '/')
>                       {
>                               if([path characterAtIndex:0] != '~')            
>                 
>                               {
>                               
>                                       // this is when the file to save is 
> relative to the compostion
>                                       //NSString* bundlePath = [[NSBundle 
> bundleWithIdentifier:@"com.yourcompany.broto_XML-Exporter" ] bundlePath];
>                                       //NSString* unbundlePath = [[NSBundle 
> mainBundle] resourcePath] unbundlePath];
>                               //      path = [NSString 
> stringWithFormat:@"%@/%@",unbundlePath,path];
>                                       NSLog(@"current untilde path : %@", 
> path);
>                               }
>                               
>                               else
>                               {       // it is a ~ directory, expand it
>                               
>                                               path = [path 
> stringByExpandingTildeInPath];
>                                               ///NSLog(@"current untilde path 
> : %@", path);
> 
>                               }
>                       }
>                       
>                       
>               }
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> 2010
> 
> Confidencialidade de Correio electrónico
> Este email destina-se exclusivamente à(s) pessoa(s) a quem é dirigido e não 
> deverá em caso algum ser reencaminhado ou reutilizado para nenhum fim a não 
> ser aquele para o qual foi criado. Aplicável tambem aos attachments.
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Quartzcomposer-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/quartzcomposer-dev/tamas.lov.nagy%40gmail.com
> 
> This email sent to [email protected]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to