Initial commit
This commit is contained in:
commit
4aa24d6d76
|
@ -0,0 +1,6 @@
|
|||
.dub
|
||||
docs.json
|
||||
__dummy.html
|
||||
*.o
|
||||
*.obj
|
||||
dtagfs
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 8daf1d4fffbcd1415b963ed5a43fae5e4bf06464
|
|
@ -0,0 +1,6 @@
|
|||
name "dtagfs"
|
||||
description "A tag-based FUSE virtual file system"
|
||||
authors "Les De Ridder"
|
||||
copyright "Copyright © 2016, Les De Ridder"
|
||||
license "NCSA"
|
||||
dependency "dfuse" version="~>0.3.0"
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"fileVersion": 1,
|
||||
"versions": {
|
||||
"dfuse": {"path":"dfuse"}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
module dtagfs.app;
|
||||
|
||||
import std.stdio;
|
||||
import std.getopt;
|
||||
import std.array;
|
||||
|
||||
import dfuse.fuse;
|
||||
|
||||
import dtagfs.filesystem;
|
||||
import dtagfs.tagprovider;
|
||||
|
||||
void main(string[] args)
|
||||
{
|
||||
//TODO: Make tag provider(s) configurable
|
||||
|
||||
if(args.length < 2)
|
||||
{
|
||||
stderr.writeln("usage: dtagfs <source> <mount point> [-f] [-o option[,options...]]");
|
||||
return;
|
||||
}
|
||||
|
||||
auto source = args[0];
|
||||
auto mountPoint = args[1];
|
||||
|
||||
TagProvider[] tagProviders;
|
||||
|
||||
string[] mountOptions;
|
||||
bool fork;
|
||||
arraySep = ",";
|
||||
auto otherArgs = args[2..$];
|
||||
auto options = getopt(
|
||||
otherArgs,
|
||||
|
||||
"o", &mountOptions,
|
||||
"f|fork", &fork
|
||||
);
|
||||
|
||||
auto filesystem = mount(source, mountPoint, tagProviders, mountOptions, fork);
|
||||
}
|
||||
|
||||
FileSystem mount(string source, string mountPoint, TagProvider[] tagProviders, string[] options, bool fork)
|
||||
{
|
||||
auto filesystem = new FileSystem(source, tagProviders);
|
||||
|
||||
auto fuse = new Fuse("dtagfs", !fork, false);
|
||||
fuse.mount(filesystem, mountPoint, options);
|
||||
|
||||
return filesystem;
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
module dtagfs.filesystem;
|
||||
|
||||
import dfuse.fuse;
|
||||
|
||||
import dtagfs.tagprovider;
|
||||
|
||||
class FileSystem : Operations
|
||||
{
|
||||
this(string source, TagProvider[] tagProviders)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
module dtagfs.tagprovider;
|
||||
|
||||
class TagProvider
|
||||
{
|
||||
|
||||
}
|
Loading…
Reference in New Issue