

How the file system works:
--------------------------------------------------------------------------------
When the remote connection is asked for files it provides an FSHandle that
represents the path of the remote file along with the handle's remote handle
information.

When a file is clicked by the user it is downloaded to the 'Recent Files'
folder. This is a _new_ handle that is separate from the handle provided when
calling contentsAtDirectory:success:failure:. When the downlaod operation completes
the file will contain a reference to the original handle's remoteHandle and
point to a local file where it is saved. This file can now edited locally.

When a linked file is loaded from within 'Recent Files', the file navigator
will first check to see if the file clicked on is linked. If it is, it will
open the editor with the _linked_ file. This is necessary to ensure that the
UI updates with progress/status of remote operations.

Currently the system will support only ONE folder that contains recent files.
Currently this is the 'Recent Files' manager. In order for this to work with
multiple managers, the FM must have a folder created within 'Links' (logic
already complete) and the FSHandle linkConfigUrl will need to ensure that it
appends the linkConfigUrl+FileManager.name+File.name. Currently the URL is
linked only to 'Recent Files'.

Find matching paranthesis
--------------------------------------------------------------------------------

http://stackoverflow.com/questions/12752225/how-do-i-find-the-position-of-matching-parentheses-or-braces-in-a-given-piece-of
Given the position of an open parenthesis in an array of characters, there's a simple algorithm that uses a counter to find the matching close parenthesis.

Initialize a counter to 1.
Loop forward (to the right) through the text.
If another open parenthesis is encountered, increment the counter.
If a closing parenthesis is encountered, decrement the counter.
When the counter reaches zero, you've found the matching closing parenthesis.
In code this looks something like:

public int findClosingParen(char[] text, int openPos) {
    int closePos = openPos;
    int counter = 1;
    while (counter > 0) {
        char c = text[++closePos];
        if (c == '(') {
            counter++;
        }
        else if (c == ')') {
            counter--;
        }
    }
    return closePos;
}
The algorithm for finding the position of the matching open parenthesis given a closing parenthesis is the opposite.

Initialize a counter to 1.
Loop backwards (to the left) through the text.
If an open parenthesis is encountered, decrement the counter.
If a closing parenthesis is encountered, increment the counter.
When the counter reaches zero, you've found the matching open parenthesis.
In code:

public int findOpenParen(char[] text, int closePos) {
    int openPos = closePos;
    int counter = 1;
    while (counter > 0) {
        char c = text[--openPos];
        if (c == '(') {
            counter--;
        }
        else if (c == ')') {
            counter++;
        }
    }
    return openPos;
}
Note: Both of the examples above assume that parentheses are balanced, so no array bounds checking is done. A real implementation would check that you don't run off the end of the array, and throw an exception (or return an error code) that indicates that parentheses are unbalanced in the input text if you do.

iOS Icon Sizes (App images)

57 x 57 pixels
114 x 114 pixels (high resolution)
For iPad, this size is required:

72 x 72 pixels
