Giter Site home page Giter Site logo

php-fuse's Introduction

fuse binding for PHP
------------------------
This extension allows you to build a FUSE-based virtual filesystem in PHP
code.

Prerequisites
------------------------
PHP5.6 (aka bleeding edge dev) is tested and compatible, compiling and
running should be possible on 5.3.

x86 systems have not been tested at all. They're likely to make problems,
too, because PHPs integer datatype is unsigned (31bit), which makes PHP able
to only represent 2GB (as it's stated on every fs-related php manual page).
There will be no official support for x86, it's simply a dying world.

Options parsing
------------------------
Either you do your own, or use FUSEs (which is recommended, because it gives
all filesystem mounters a consistent interface). There's a template in the
examples/ directory that should help you to get started. Please note that
the user_data function is only usable in opt_parse, and even there it's
nearly not as flexible as the original.

!!! Please note that fuse_main enforces -s to explicitly force single-threading !!!

Supported operations
------------------------
getattr
readlink
getdir
mknod
mkdir
unlink
rmdir
symlink
rename
link
chmod
chown
truncate
utime
open
create
read
write
statfs
flush
release
fsync
setxattr
getxattr
listxattr
removexattr

(Currently) Not supported operations
------------------------
opendir
readdir
releasedir
fsyncdir
init
destroy
access
ftruncate
fgetattr
lock
utimens
bmap
ioctl
write_buf
read_buf
flock
fallocate

TODO
------------------------
Thread safety - right now, a mutex should protect the object from
multithreading issues, at least without ZTS. Enabling ZTS and then running the layer
in multi-thread mode will lead to the bad situation that active_object and the mutex
end up in different thread-local storages, or such. At least, the value of
&FUSEG(active_object) is most likely to be NULL. For the love of God, please
let your fingers off multi-threading!

utime has to be replaced by utimens.

init and destroy definitely should be implemented to allow safe
setup/cleanup.

Links
------------------------
- FUSE: http://fuse.sourceforge.net/
- fuse.h: http://fuse.git.sourceforge.net/git/gitweb.cgi?p=fuse/fuse;a=blob;f=include/fuse.h

php-fuse's People

Contributors

msmuenchen avatar fujimoto avatar littlekita avatar krakjoe avatar tmyt avatar russ666 avatar

Stargazers

Harald Lapp avatar Serge Besedkov avatar

Watchers

James Cloos avatar  avatar

Forkers

russ666 mta59066

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.