Google Drive KIOSlave

Dan Vratil dvratil at redhat.com
Thu Sep 27 15:21:40 BST 2012


On Thursday 27 of September 2012 08:23:46 Andrius da Costa Ribas wrote:
> Hello,

Hi,

> 
> I'm not sure if this is the correct place to ask but I've started writing a
> google drive kioslave and reached some particularities of this "filesystem"
> that I'd like some suggestions:
> 
> 1. Google drive has its own trash:
> - for this one I'm thinking about making two different protocols
> "googledrive:" and "googledrivetrash:". Would be there a cleaner way to
> represent the "trash" concept?
> 
> 2. Google drive allows identical filenames.
> -files have a unique id, but can have the very same filename. It would not
> be practical to use the id in the kio url, but using the filename may lead
> to conflicts. Google drive windows syncing program renames the second file
> (e.g. "file.txt" and "file (2).txt") but only in the syncing folder,
> however I don't think this is a clean solution for a kioslave.

I don't know if it's supported by kioslave, but since the file will be uniquely 
represented by it's URI, you can have two files with the same filename but 
different URIs in the background. 

> 
> 3. It apparently has no character restriction on filenames.
> -windows syncing app replaces unsupported characters with underscores. I
> think percent encoding would be a better solution.

Linux uses UTF-8 for filenames, so that should not be a problem (?).

> 
> 4. There are no symlinks, but files can be parented by multiple folders.
> - how to deal with this?

I think there's a flag for symlinks support in kioslave class. Regarding the 
one file in multiple folders - you can simply list the file (as a real file) in 
all the folders it belongs to.


The main reason this email caught my eye is that I'm the maintainer of 
LibKGAPI - a KDE library that implements Google's APIs. It's already used by 
the Akonadi resources. You could implement support for GDrive API to the 
LibKGAPI (I'm willing to help and assist you in anyway needed) and just build 
the KIO slave on top of the LibKGAPI. Please mail me or ping me on IRC 
(dvratil) if you were interested.

I tried to implement the GDrive (I actually tried back in the GDocs-only days) 
KIO slave, but failed miserably. So fingers crossed!

Cheers,
Dan

> 
> Thanks in advance,
> --
> Andrius.

-- 
dvratil at redhat.com | Associate Software Engineer / BaseOS / KDE, Qt
GPG Key: 0xC59D614F6F4AE348
Fingerprint: 4EC1 86E3 C54E 0B39 5FDD B5FB C59D 614F 6F4A E348
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20120927/b96659c6/attachment.sig>


More information about the kde-core-devel mailing list