Comments (2)
FileInfo stores the path as an array of bytes, regardless of its encoding, since that is required to be able to sort file info's correctly. It also stores the normalized path which is used to detect duplicates (this does not have to be stored and could be computed at use also). And also stores the absolute local path (which also can be derived at use)
Sorry but I don't understand what you have in mind when you talk about keeping URLs in there. Can you eloberate on this please, an example could possibly be useful also.
thanks,
from yajsync.
I published a spartan implementation of an encrypting FileSystem, see https://github.com/usrflo/encfs4j
The following test class shows how I added encfs4j to yajsync using the proposed CustomFileSystem class and modifications in #19 :
package com.github.perlundq.yajsync.ui;
import java.io.IOException;
import java.net.URI;
import java.nio.file.FileSystem;
import java.nio.file.spi.FileSystemProvider;
import java.util.HashMap;
import java.util.Map;
import com.github.perlundq.yajsync.io.CustomFileSystem;
import de.agitos.encfs4j.EncryptedFileSystemProvider;
public class CryptedSyncClient {
public static void main(String[] args) throws IOException
{
System.err.println("Warning: this software is still unstable and " +
"there might be data corruption bugs hiding. So " +
"use it only carefully at your own risk.");
FileSystemProvider provider = new EncryptedFileSystemProvider();
Map<String,String> env = new HashMap<String,String>();
env.put(EncryptedFileSystemProvider.CIPHER_ALGORITHM, "AES");
env.put(EncryptedFileSystemProvider.CIPHER_ALGORITHM_MODE, "CTR");
env.put(EncryptedFileSystemProvider.CIPHER_ALGORITHM_PADDING, "NoPadding");
env.put(EncryptedFileSystemProvider.SECRET_KEY, "1234567890abcdef"); // 128 bit key
env.put(EncryptedFileSystemProvider.REVERSE_MODE, "true");
env.put(EncryptedFileSystemProvider.FILESYSTEM_ROOT_URI, "file:/yajsync-test/data/");
URI uri = URI.create("enc:///");
FileSystem fs = provider.newFileSystem(uri, env);
CustomFileSystem.setFileSystem(fs);
new YajSyncClient().start(args);
}
}
from yajsync.
Related Issues (20)
- --times does not support setting file mtime to sub second resolution HOT 1
- --ignore-times: don't skip files that match size and time (updated subject) HOT 3
- IAE when receiving existing file larger than 2 GiB
- FileInfo.compareTo(): _pathNameBytes / _normalizedPath HOT 1
- Support for MaxOS X rsync HOT 5
- rsync compatibility and special characters in path names HOT 4
- Preconditions for adding timeout options HOT 3
- Bug in RsyncUrl remote path building if remote port is updated HOT 1
- broken pipe/deadlock when deferred updates fails
- protocol mismatch: rsync sender sends trailing data on nonexisting path
- Exception propagation for SystemTests HOT 1
- Keep alive message handling HOT 1
- --bwlimit and external project dependency HOT 2
- ETA for first tagged release? HOT 3
- test failure in testConnectionTimeout HOT 2
- Licence HOT 3
- Event listener HOT 2
- Do I have to start a client and server separately on both local and remote for sync the files? HOT 1
- How to dynamically send the directory that needs to be synced? HOT 1
- Push or pull protocol
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yajsync.