Code Monkey home page Code Monkey logo

drivefs's Introduction

drivefs

An experimental FUSE filesystem for Google Drive written in pure go.

Status

drivefs is currently functional, but experimental. Bugs still exist so please report them!

FUSE functions supported.

Function drivefs Google Drive
Create X X
Flush X X
FSync - X
GetAttr X X
GetXAttr - X
Link - -
Mkdir X X
Read - X
ReadAll X X
ReadDir X X
Remove X X
Rename X X
RmDir X X
SetAttr X X
SetXAttr - -
Symlink - -
Update X X
Write X X

Installation

go get github.com/eliothedeman/drivefs
cd $GOPATH/src/github.com/eliothedeman/drivefs
go build

Usage

./drivefs -mount /path/to/mountpoint -code yourGoogleDriveAuthCode

How to get your Google Drive auth code

Simply running ./drivefs -getCode will give you a link to open in a browser which will provide you with your personal code.

Special Thanks

Notice

drivefs can only run on *nix systems. You will need the FUSE package for your OS installed(not the FUSE clib). For OSX you will need OSXFUSE.

Contact

drivefs was written by Eliot Hedeman Who can be contacted at [email protected].

drivefs's People

Contributors

eliothedeman avatar

Stargazers

ekis avatar Richard Scoop avatar Mikal avatar Diego Bellani avatar Albert Hafvenström avatar Florian Bertholin avatar  avatar Andreas Koch avatar Recai Oktaş avatar Valeri Sokolov avatar  avatar Travis Cline avatar Frank Blechschmidt avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

albhaf

drivefs's Issues

Panic on run, Linux x64

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x4604e8]

goroutine 121 [running]:
runtime.panic(0x6c4460, 0xa60e28)
        /home/matt/.gvm/gos/go1.2.1/src/pkg/runtime/panic.c:266 +0xb6
github.com/eliothedeman/drivefs/lib.func·001()
        /home/matt/git/go/src/github.com/eliothedeman/drivefs/lib/driveDir.go:118 +0x438
created by github.com/eliothedeman/drivefs/lib.(*DriveDir).ReadDir
        /home/matt/git/go/src/github.com/eliothedeman/drivefs/lib/driveDir.go:131 +0xf0

goroutine 1 [chan receive]:
main.main()
        /home/matt/git/go/src/github.com/eliothedeman/drivefs/drivefs.go:91 +0x7f6

goroutine 3 [syscall]:
os/signal.loop()
        /home/matt/.gvm/gos/go1.2.1/src/pkg/os/signal/signal_unix.go:21 +0x1e
created by os/signal.init·1
        /home/matt/.gvm/gos/go1.2.1/src/pkg/os/signal/signal_unix.go:27 +0x31

goroutine 5 [syscall]:
syscall.Syscall(0x0, 0x7, 0xc210467000, 0x2000, 0x643ec0, ...)
        /home/matt/.gvm/gos/go1.2.1/src/pkg/syscall/asm_linux_amd64.s:18 +0x5
syscall.read(0x7, 0xc210467000, 0x2000, 0x2000, 0x2000, ...)
        /home/matt/.gvm/gos/go1.2.1/src/pkg/syscall/zsyscall_linux_amd64.go:838 +0x72
syscall.Read(0x7, 0xc210467000, 0x2000, 0x2000, 0x2000, ...)
        /home/matt/.gvm/gos/go1.2.1/src/pkg/syscall/syscall_unix.go:135 +0x5c
bazil.org/fuse.(*Conn).ReadRequest(0xc210047900, 0x7ffef50dfd88, 0xc2104100f0, 0x0, 0x0)
        /home/matt/git/go/src/bazil.org/fuse/fuse.go:377 +0x131
bazil.org/fuse/fs.(*Server).Serve(0xc21013e480, 0xc210047900, 0x7ffef4f58f48, 0x45fce7)
        /home/matt/git/go/src/bazil.org/fuse/fs/serve.go:327 +0x48e
bazil.org/fuse/fs.Serve(0xc210047900, 0x7ffef50df170, 0x0, 0x7ffef50df170, 0x0)
        /home/matt/git/go/src/bazil.org/fuse/fs/serve.go:346 +0x77
github.com/eliothedeman/drivefs/lib.(*Server).Serve(0xc2100388f0, 0xa)
        /home/matt/git/go/src/github.com/eliothedeman/drivefs/lib/server.go:81 +0xd5
created by main.main
        /home/matt/git/go/src/github.com/eliothedeman/drivefs/drivefs.go:85 +0x6a3

goroutine 11 [chan receive]:
github.com/eliothedeman/drivefs/lib.func·005()
        /home/matt/git/go/src/github.com/eliothedeman/drivefs/lib/server.go:73 +0x51
created by github.com/eliothedeman/drivefs/lib.(*Server).Serve
        /home/matt/git/go/src/github.com/eliothedeman/drivefs/lib/server.go:80 +0x77

goroutine 7 [syscall]:
runtime.goexit()
        /home/matt/.gvm/gos/go1.2.1/src/pkg/runtime/proc.c:1394
created by os/signal.init·1
        /home/matt/.gvm/gos/go1.2.1/src/pkg/os/signal/signal_unix.go:27 +0x31

goroutine 5 [syscall]:
syscall.Syscall(0x0, 0x7, 0xc210467000, 0x2000, 0x643ec0, ...)
        /home/matt/.gvm/gos/go1.2.1/src/pkg/syscall/asm_linux_amd64.s:18 +0x5
syscall.read(0x7, 0xc210467000, 0x2000, 0x2000, 0x2000, ...)
        /home/matt/.gvm/gos/go1.2.1/src/pkg/syscall/zsyscall_linux_amd64.go:838 +0x72
syscall.Read(0x7, 0xc210467000, 0x2000, 0x2000, 0x2000, ...)
        /home/matt/.gvm/gos/go1.2.1/src/pkg/syscall/syscall_unix.go:135 +0x5c
bazil.org/fuse.(*Conn).ReadRequest(0xc210047900, 0x7ffef50dfd88, 0xc2104100f0, 0x0, 0x0)
        /home/matt/git/go/src/bazil.org/fuse/fuse.go:377 +0x131
bazil.org/fuse/fs.(*Server).Serve(0xc21013e480, 0xc210047900, 0x7ffef4f58f48, 0x45fce7)
        /home/matt/git/go/src/bazil.org/fuse/fs/serve.go:327 +0x48e
bazil.org/fuse/fs.Serve(0xc210047900, 0x7ffef50df170, 0x0, 0x7ffef50df170, 0x0)
        /home/matt/git/go/src/bazil.org/fuse/fs/serve.go:346 +0x77
github.com/eliothedeman/drivefs/lib.(*Server).Serve(0xc2100388f0, 0xa)
        /home/matt/git/go/src/github.com/eliothedeman/drivefs/lib/server.go:81 +0xd5
created by main.main
        /home/matt/git/go/src/github.com/eliothedeman/drivefs/drivefs.go:85 +0x6a3

goroutine 11 [chan receive]:
github.com/eliothedeman/drivefs/lib.func·005()
        /home/matt/git/go/src/github.com/eliothedeman/drivefs/lib/server.go:73 +0x51
created by github.com/eliothedeman/drivefs/lib.(*Server).Serve
        /home/matt/git/go/src/github.com/eliothedeman/drivefs/lib/server.go:80 +0x77

goroutine 7 [syscall]:
runtime.goexit()
        /home/matt/.gvm/gos/go1.2.1/src/pkg/runtime/proc.c:1394

goroutine 8 [finalizer wait]:
runtime.park(0x40bc00, 0xa64b70, 0xa62968)
        /home/matt/.gvm/gos/go1.2.1/src/pkg/runtime/proc.c:1342 +0x66
runfinq()
        /home/matt/.gvm/gos/go1.2.1/src/pkg/runtime/mgc0.c:2279 +0x84
runtime.goexit()
        /home/matt/.gvm/gos/go1.2.1/src/pkg/runtime/proc.c:1394

goroutine 9 [runnable]:
net/http.(*persistConn).readLoop(0xc210064680)
        /home/matt/.gvm/gos/go1.2.1/src/pkg/net/http/transport.go:778 +0x68f
created by net/http.(*Transport).dialConn
        /home/matt/.gvm/gos/go1.2.1/src/pkg/net/http/transport.go:528 +0x607

goroutine 10 [select]:
net/http.(*persistConn).writeLoop(0xc210064680)
        /home/matt/.gvm/gos/go1.2.1/src/pkg/net/http/transport.go:791 +0x271
created by net/http.(*Transport).dialConn
        /home/matt/.gvm/gos/go1.2.1/src/pkg/net/http/transport.go:529 +0x61e

goroutine 120 [select]:
github.com/eliothedeman/drivefs/lib.(*DriveDir).ReadDir(0xc21043b940, 0xc210419000, 0xc21043b940, 0x7ffef50dfdc0, 0xc21043b940, ...)
        /home/matt/git/go/src/github.com/eliothedeman/drivefs/lib/driveDir.go:133 +0x2b2
bazil.org/fuse/fs.(*serveConn).serve(0xc210242d20, 0x7ffef50dfd88, 0xc2104100f0)
        /home/matt/git/go/src/bazil.org/fuse/fs/serve.go:1045 +0xdc7
created by bazil.org/fuse/fs.(*Server).Serve
        /home/matt/git/go/src/bazil.org/fuse/fs/serve.go:335 +0x557

Only show files that can be read or modified.

Google drive only allows "non-drive" type files to be downloaded(i.e. files created on google drive need to be exported to an external format before they can be downloaded). Either only show files which can be downloaded, ore find a way to auto export files when they are requested.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.