2
votes
Vote UpVote

Reading and writing files from an iOS FireMonkey application

The Hacker's Corner – Here’s an example of how you can read and write files in your iOS FireMonkey application. Enjoy! {$IFDEF FPC} var content : NSString; {$ENDIF} {$IFDEF FPC} function MyFileName : NSString; var paths : NSArray; fileName : NSString; begin paths := NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, True); fileName := paths.objectAtIndex(0); fileName.stringByAppendingString(NSSTR(PChar(’/myfile.txt’))); Result := fileName; end; {$ENDIF} procedure TForm1.Button1Click(Sender: TObject); begin // Write to file {$IFDEF FPC} Label2.Text := ...
Favorite? Off-Topic? Anders Ohlsson @ 2011-10-05 05:15

Statistics

Visits: 785
Votes: 2
Favorites: 1
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Mark.0161
vcldeveloper
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)