Sets the current working folder for the current app.
class property CurrentFolder: String;
All media loading will be done relative to the current folder. e.g. setting the folder directory to "images" and then loading an image "background.png" would attempt to load "images/background.png". This applies to both the read and write folder, so using TAgkFileWriter with the previous example would also write to the "images" folder. You can not use absolute paths like "c:\myfolder", as the application has a self contained read folder containing its media, and a self contained write folder for new files. To reset the current folder back to the application's default path use an empty string. When setting a folder that does not exist, nothing will happen. The folder only has to exist in one of the locations (read and write folders) for this to succeed. Note that setting Folder to an empty string will place you outside this folder so you will then need to set Folder to 'media' again to get back to the media folder. Alternatively just set Folder to an empty string at the beginning of your app and work from the root folder instead.
When reading the property, the returned path will always have a slash as the final character except when in the root folder in which case an empty string will be returned.
Copyright (c) 2012. All rights reserved.
|