Projects/KioFuse

From KDE TechBase
Revision as of 09:43, 20 January 2008 by Vladc (talk | contribs) (Finished unlink, rmdir, and rename)


KioFuse


KioFuse allows you to mount remote directories into the root hierarchy of your local file system, thereby exposing KDE's advanced access capabilities (SSH, SAMBA/Windows, FTP, TAR/GZip/BZip2, WebDav, etc) to POSIX-compliant applications such as Firefox, OpenOffice, GNOME apps, shell utilities and more. Another important advantage of KioFuse is that it allows you to arrange the hierarchy of all your remote, archived and compressed files in whichever way makes sense to you.

KioFuse works by acting as a bridge between KDE's KIO filesystem design and FUSE.

Installation

  • Install kdelibs (version 4.0 or higher) provided by your Operating System or compile it according to these intructions.
  • Type the following commands into a terminal:

svn checkout svn://anonsvn.kde.org/home/kde/trunk/playground/libs/kiofuse cd kiofuse cmake . make

Running KioFuse

  • Mount with:

kiofuse --mountpoint <mountpoint> --URL <URL>

  • Unmount with:

fusermount -u <mountpoint>

Real-world example:

  1. Create the mount point

mkdir ~/fuse-source

  1. Download the compressed archive of the FUSE source code

wget http://superb-east.dl.sourceforge.net/sourceforge/fuse/fuse-2.7.2.tar.gz -P ~

  1. Mount the archive in ~/fuse-source

./kiofuse --mountpoint ~/fuse-source --URL tar:~/fuse-2.7.2.tar.gz &

  1. Browse the source code in your favorite filemanager without ever needing to unpack the archive!

dolphin ~/fuse-source & nautilus ~/fuse-source & thunar ~/fuse-source &

Screenshots

Features and TODO

  • Some KIO slaves such as tar: don't support seeking and therefore won't be able to read or write to files. Fixing these slaves is on the TODO list.
  • KIO needs to be modified so that it is aware of KioFuse mounts and so that it uses its native functions (as opposed to POSIX) to access those resources.

POSIX Capabilities

See the FUSE API for the list of all file I/O commands.

Name Description Filename
GetAttr Permissions, Owner, Group Done
ReadLink Determine destination of link Done
MkNod Create file Done
MkDir Create a directory Done
UnLink Remove a symlink Done
RmDir Remove a directory Done
SymLink Create a symlink Not Started
Rename Rename a file or directory Done
Link Create a hard link Not Started
Chmod Change permissions of a file or directory Done
Chown Change owner of a file or directory Work In Progress
Truncate Change the size of a file Done
Open Open a file for reading, writing, and/or truncating Done
Read Read the contents of a file Done
Write Write data to a file Done
StatFS Get Filesystem Statistics Not Started
Flush Flush cached data Not Started
Release Close an opened file Done
FSync Synchronize file contents Not Started
SetXAttr Set external attributes Not Started
GetXAttr Get external attributes Not Started
ListXAttr List external attributes Not Started
RemoveXAttr Remove external attributes Not Started
OpenDir Open a directory Not Started
ReadDir List files and subdirectories Done
ReleaseDir Release directory Not Started
FSyncDir Synchronize directory contents Not Started
Init Initialize filesystem Not Started
Destroy Clean up filesystem Not Started
Access Check file access permissions Work In Progress
Create Create and open a file Not Started
FTruncate Change the size of an open file Not Started
FGetAttr Get attributes of an open file Not Started
Lock Lock a resource Not Started
UTimeNS Change the access and mod times in nanoseconds Not Started

Source Code

The source code to KioFuse can be browsed at: http://websvn.kde.org/trunk/playground/libs/kiofuse/