3

First, let me tell you about Gmail Drive: http://en.wikipedia.org/wiki/GMail_Drive

Now what I want is to store some data in a text file or so, timely to this GMail Drive. I am looking for your help on how to do this.

I would appreciate alternatives that you recommend, but be thankful if you provide an insight to this problem only without any alternatives.

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
Pratik
  • 11,534
  • 22
  • 69
  • 99
  • 1
    the wiki is saying that extension abstracts the "drive" as a share, which leads me to believe regular file i/o would cause the drivers to save the file.. should be very simple – zanlok Nov 24 '10 at 06:20
  • @zanlok: I thought the same thing, but the only thing that caught my eye is where it says that it doesn't assign the virtual drive a drive letter. I have never used the Gmail Drive, but I'm not sure how exactly how the standard file I/O functions would work with it if this is the case. – Cody Gray - on strike Nov 24 '10 at 06:36
  • 1
    Something similar http://stackoverflow.com/questions/138080/emulate-hard-disk-in-net , http://stackoverflow.com/questions/1011190/how-do-i-programmatically-access-system-folder-created-by-gmail-drive but still i am clueless.. – Pratik Nov 24 '10 at 06:49
  • 1
    bad news: with DriveInfo.GetDrives() we can not get any information about Gmail Drive, test in windows7 + visual studio 2010 c# express –  Feb 03 '11 at 14:52

4 Answers4

1

From Gdrive,

GMail Drive is a Shell Namespace Extension that creates a virtual filesystem around your Google GMail account, allowing you to use GMail as a storage medium.

so this is simply a virtual drive. There is a way to access virtual drives from c#, using System.IO.IsolatedStorage.

And check out this Performing Isolated Storage Tasks for How to use isolated storage from your application.

Note: I dont have any experience with gdrive before. So it may or maynot work.

RameshVel
  • 64,778
  • 30
  • 169
  • 213
  • i hv never used System.IO.IsolatedStorage before can you provide some pseudo-code or so for the same. – Pratik Nov 24 '10 at 07:43
  • 1
    I don't think the purpose of SO is to hand you a working solution, but to point you in the right direction. Ramesh may have hit on a better answer than mine, but check the links there, too. – zanlok Nov 24 '10 at 16:34
1

Even though there's no drive letter, the volume should be visible. Try the code below as a quick test, and then more info from "here" to see what's on the volume. Then, you should be able to extend all that to read/write files on it, as well.

using System.IO;
foreach( DriveInfo driveInfo in DriveInfo.GetDrives() ) {
   // ...
}
zanlok
  • 1,608
  • 1
  • 16
  • 29
  • I am only getting my physical drives DriveInfo.GetDrives() and NOT gamil drive. how should i go ahead with ? – Pratik Nov 25 '10 at 06:32
0

Here's a php project for accesing gmail drive , but i have no idea about accessing it through C# .NET

Is this alt text what you are looking for ? Then i would recommend above php solution, no idea for .NET

Pratik
  • 11,534
  • 22
  • 69
  • 99
  • Sorry, i dunno php. Looking forward for .NET solution only, if any. Thanks – Pratik Nov 24 '10 at 07:10
  • @Patrick, the link you have mentioned accessing gmail from php. This is nothing to do with GDrive... – RameshVel Nov 24 '10 at 07:15
  • @Ramesh I don't much about gmail drive but i have used it and to my knowledge it stores user files as an attachments to corresponding email ID. Same happens in above php project and for your reference : http://sourceforge.net/projects/pgd/ – Pratik Nov 24 '10 at 07:21
  • pgd is a plugin you can use within your php web app to show the gmail files. But gdrive is windows extenstion where you can have a physical like (virtual) drive to store and view gmail file. I think drive in PhpGmailDrive and GDrive confused you... no worries. – RameshVel Nov 24 '10 at 07:25
  • Thanks for clarifying but still i guess at the end both works the same i.e. saves files in the form of gmail attachments and looking only for .NET solution only. – Pratik Nov 24 '10 at 07:40
  • This is not what the OP asked for. – Clinton Ward Aug 07 '12 at 08:36
0

I have not tried this personally, but heard very good things

Mail.net

The author is always update, he also on twitter alot.

Cheers

Iain
  • 6,392
  • 2
  • 30
  • 50
  • Thanks for an alternative but as i already said, i am specifically looking for Gmail Drive and C# .NET solution to access it. – Pratik Nov 24 '10 at 07:38