[futurebasic] Re: [FB] open file

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : August 2012 : Group Archive : Group : All Groups

From: Carlos Frías <carfrino@...>
Date: Mon, 13 Aug 2012 00:33:28 +0200
First of all, thanks so much for all and for your time! You are like
an angels in this terrifying moments for me... I'm feel alone in the
desert of FBtoC !!!!!!! Praise be to God for doing fighter people like
you!

Well; if you remenber me, I worte you about my problems with files and
very kindly my request had a quick reply from you but... I think I
continue misunderstanding the procedure... (Sorry creature...!)
I send you the whole of my problem and I hope you can help with it...
In the attached file there is a folder and a little program (the only
I was able to make run :-( .... ): my purpose is that from this
program can  open for input and for output files into the diferents
other folders; in other works: without windows opened to save or open
a file hace under control the differents levels of the folders from
the first of one ("Plataforma Cygnus X-1") to the others and
vice-versa.

Example 1º: from "programa" open or save a file that is in
"Zbiblioteca"/"Campos/Sistemas".

Example 2º: from "programa2" (into the "Programas Auxiliares" folder)
open or save a file that is in "Zbiblioteca"/"Campos/Sistemas".

Example 2º:  And the last (but not the least...), from "programa" run
an app that can begin to exist
in the "Programas Auxiliares" folder (for example, "programa2".

Sincerely and thankfully

Carlos Frías


***************************************************
2012/8/9, Brian S <fblistserve@...>:
>
> On Aug 9, 2012, at 1:21 PM, Ted Spencer wrote:
>
>>> err = fn FD_ApplicationDirectoryCreateCFURL( @appDirUrl )
>>
>> Some of us ...., are having a bit of trouble with this... Does the line
>> above create a URL for the app folder - and the app folder alone?
> Minor amendments to Bernie’s code display the contents of appDirUrl and
> fileUrl as they are loaded. Maybe that will clarify the FD calls?
>
> '---------------
> include "Util_FileDirectory.incl"
> include "FBLog.incl"
>
> dim as CFURLRef      appDirUrl, fileUrl
> dim as CFStringRef   fileName
> dim as OSStatus      err
>
> fileName = @"Colors"
> err = fn FD_ApplicationDirectoryCreateCFURL( @appDirUrl )
> FBLog(@"%@",appDirUrl )
>
> if ( err == _noErr )
> fileUrl = fn CFURLCreateCopyAppendingPathComponent( _kCFAllocatorDefault,
> appDirUrl, fileName, _false )
> FBLog(@"%@",fileUrl )
>
> if ( fileUrl != NULL )
> if ( fn FD_ObjectExistsCFURL( fileUrl ) )
> open "I", 1, @fileUrl
> // do something
> FBLog(@"File opened")
> close 1
> end if
> CFRelease( fileUrl )
> end if
> CFRelease( appDirUrl )
> end if
> RunApplicationEventLoop
> '---------------
>
>
> Brian S.
>
>
>
>
>
> --
> To unsubscribe, send ANY message to: futurebasic-unsubscribe@...
> To access the list archives, go to:
> http://freegroups.net/groups/futurebasic/
>
>