Confirmed users
295
edits
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
== Examples == | == Examples == | ||
| Line 25: | Line 24: | ||
== Proposed Solution == | == Proposed Solution == | ||
=== API === | |||
# Get a File object | # Get a File object | ||
| Line 39: | Line 38: | ||
# Writes to MyProjectMeta/example.js/status-messages | # Writes to MyProjectMeta/example.js/status-messages | ||
TODO: Missing from this API are examples of pickling and appending. | |||
=== Data Storage === | |||
Inside a users project directory we should have something like: | Inside a users project directory we should have something like: | ||
| Line 79: | Line 80: | ||
// in a separate file to avoid unnecessary IO | // in a separate file to avoid unnecessary IO | ||
live-edit:"The full text of the file\nincluding new lines\n", | live-edit:"The full text of the file\nincluding new lines\n", | ||
// We need a set of diffs for time machine to take us from the saved | // We need a set of diffs for time machine to take us from the saved | ||
// version to the live version. This example is raw from mobwrite but | // version to the live version. This example is raw from mobwrite but | ||
| Line 89: | Line 90: | ||
"u:ycxraw:-\nF:12:sharer/sharer_project/test.txt\nd:12:" | "u:ycxraw:-\nF:12:sharer/sharer_project/test.txt\nd:12:" | ||
], | ], | ||
// We should record each time the file is saved back to the last commit | // We should record each time the file is saved back to the last commit | ||
// This allows time machine to work properly. The changes will be | // This allows time machine to work properly. The changes will be | ||
| Line 98: | Line 99: | ||
"24,25d23\n< \n< alert('hello');\n27c25\n< alert('world');\n---\n" | "24,25d23\n< \n< alert('hello');\n27c25\n< alert('world');\n---\n" | ||
], | ], | ||
// If discussion of features can be tied to a file then we could have a | // If discussion of features can be tied to a file then we could have a | ||
// big head-start in writing documentation | // big head-start in writing documentation | ||