Change behaviour of -f option
This commit is contained in:
parent
a141d740fd
commit
dce7458b09
@ -9,7 +9,7 @@ See [example.md](example.md).
|
||||
## Usage
|
||||
`usage: dtagfs <source> <mount point> [-f] [-o option[,options...]]`
|
||||
|
||||
-f: fork to background
|
||||
-f: don't fork to background
|
||||
|
||||
## Supported tag sources
|
||||
* Dublin Core (XMP), via [exempi-d](https://github.com/lesderid/exempi-d)
|
||||
|
10
source/app.d
10
source/app.d
@ -26,23 +26,23 @@ void main(string[] args)
|
||||
TagProvider[] tagProviders = [new DublinCoreTagProvider()];
|
||||
|
||||
string[] mountOptions;
|
||||
bool fork;
|
||||
bool foreground;
|
||||
arraySep = ",";
|
||||
auto options = getopt(
|
||||
args,
|
||||
|
||||
"o", &mountOptions,
|
||||
"f|fork", &fork
|
||||
"f|foreground", &foreground
|
||||
);
|
||||
|
||||
auto filesystem = mount(source, mountPoint, tagProviders, mountOptions, fork);
|
||||
auto filesystem = mount(source, mountPoint, tagProviders, mountOptions, foreground);
|
||||
}
|
||||
|
||||
FileSystem mount(string source, string mountPoint, TagProvider[] tagProviders, string[] options, bool fork)
|
||||
FileSystem mount(string source, string mountPoint, TagProvider[] tagProviders, string[] options, bool foreground)
|
||||
{
|
||||
auto filesystem = new FileSystem(source, tagProviders);
|
||||
|
||||
auto fuse = new Fuse("dtagfs", !fork, false);
|
||||
auto fuse = new Fuse("dtagfs", foreground, false);
|
||||
fuse.mount(filesystem, mountPoint, options);
|
||||
|
||||
return filesystem;
|
||||
|
@ -159,11 +159,11 @@ class FileSystem : Operations
|
||||
}
|
||||
|
||||
override bool access(const(char)[] path, int mode)
|
||||
{
|
||||
{
|
||||
//TODO: Check if this should always be true
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
override string[] readdir(const(char)[] path)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user