Use IRIs instead of paths

FossilOrigin-Name: 91e2a5071199dc8d87735ad50ee74a6ce030c22f1bb0d70668bef172384dcde3
This commit is contained in:
Jonathan Schleifer 2024-08-11 11:48:19 +00:00
parent 5c91e6f832
commit bd3543537b
5 changed files with 53 additions and 55 deletions

View file

@ -28,14 +28,15 @@ OF_APPLICATION_DELEGATE(Tests)
@implementation Tests
- (void)applicationDidFinishLaunching: (OFNotification *)notification
{
OFIRI *IRI = [OFIRI fileIRIWithPath: @"tests.db"];
OFFileManager *fileManager = [OFFileManager defaultManager];
SL3Connection *conn;
SL3PreparedStatement *stmt;
if ([fileManager fileExistsAtPath: @"tests.db"])
[fileManager removeItemAtPath: @"tests.db"];
if ([fileManager fileExistsAtIRI: IRI])
[fileManager removeItemAtIRI: IRI];
conn = [SL3Connection connectionWithPath: @"tests.db"];
conn = [SL3Connection connectionWithIRI: IRI];
[conn executeStatement: @"CREATE TABLE test (a INT, b TEXT, c BLOB)"];