GVFS AFP Backend - Weekly Report 6
- From: Carl-Anton <ca ingmarsson gmail com>
- To: gnome-soc-list gnome org
- Cc: Christian Kellner <kellner gmail com>
- Subject: GVFS AFP Backend - Weekly Report 6
- Date: Sun, 3 Jul 2011 22:45:48 +0200
Good evening,
I've spent a great deal of the past week thinking about how to best implement write support in the afp backend. One of the questions I had to figure out was how to implement g_file_replace in an atomic way so that a failed/cancelled write doesn't end up in a broken file. Reading the AFP spec, I found that AFP has an built in command to help with this calls FPExchangeFiles. Using this I will first write the new contents to a new temporary file and then switch the both files metadata using the aforementioned command.
Since writing turned out to be pretty tricky to implement I decided to spend some time during the week to implement file and directory creation and deletion which turned out to be much more straightforward than I expected.
During the next I'll try put my ideas for filewriting into code. Since I've already written the code for creating files I expect to pretty easily be able to implement writing to new files. After that I'll tackle replacing files atomically and appending to existing files.
The code is as usual at: https://github.com/c-a/gvfs/tree/AFP
cheers,
Carl-Anton
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]