Package aQute.libg.remote.source
Class SourceFS
- java.lang.Object
-
- aQute.libg.remote.source.SourceFS
-
class SourceFS extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
SourceFS.FileDescription
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
areaId
private java.lang.String
cwd
private java.util.Map<java.io.File,SourceFS.FileDescription>
files
private static java.util.regex.Pattern
LOCAL_P
private boolean
pathConversion
private char
separatorChar
private MultiMap<java.lang.String,java.io.File>
shas
private Sink
sink
private static java.util.regex.Pattern
UNIX_FILE_P
private static java.util.regex.Pattern
WINDOWS_FILE_P
private static java.util.regex.Pattern
WINDOWS_PREFIX
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
add(java.io.File file)
byte[]
getData(java.lang.String sha)
void
markTransform(java.io.File f)
void
sync()
protected void
sync(java.util.List<Delta> deltas)
private SourceFS.FileDescription
toRemote(java.io.File f)
private SourceFS.FileDescription
toRemote(java.lang.String localPath)
private java.lang.String
toRemotePath(java.io.File f)
java.lang.String
transform(java.lang.String s)
java.lang.String
updateSha(java.lang.String oldSha, java.io.File file)
-
-
-
Field Detail
-
WINDOWS_PREFIX
private static final java.util.regex.Pattern WINDOWS_PREFIX
-
WINDOWS_FILE_P
private static final java.util.regex.Pattern WINDOWS_FILE_P
-
UNIX_FILE_P
private static final java.util.regex.Pattern UNIX_FILE_P
-
LOCAL_P
private static final java.util.regex.Pattern LOCAL_P
-
shas
private MultiMap<java.lang.String,java.io.File> shas
-
files
private final java.util.Map<java.io.File,SourceFS.FileDescription> files
-
pathConversion
private final boolean pathConversion
-
cwd
private final java.lang.String cwd
-
separatorChar
private final char separatorChar
-
sink
private Sink sink
-
areaId
private java.lang.String areaId
-
-
Constructor Detail
-
SourceFS
SourceFS(char separatorChar, java.io.File cwd, Sink sink, java.lang.String areaId)
-
-
Method Detail
-
transform
public java.lang.String transform(java.lang.String s) throws java.lang.Exception
- Throws:
java.lang.Exception
-
toRemote
private SourceFS.FileDescription toRemote(java.lang.String localPath) throws java.lang.Exception
- Throws:
java.lang.Exception
-
toRemote
private SourceFS.FileDescription toRemote(java.io.File f) throws java.security.NoSuchAlgorithmException, java.lang.Exception
- Throws:
java.security.NoSuchAlgorithmException
java.lang.Exception
-
toRemotePath
private java.lang.String toRemotePath(java.io.File f)
-
sync
public void sync() throws java.lang.Exception
- Throws:
java.lang.Exception
-
sync
protected void sync(java.util.List<Delta> deltas) throws java.lang.Exception
- Throws:
java.lang.Exception
-
updateSha
public java.lang.String updateSha(java.lang.String oldSha, java.io.File file) throws java.security.NoSuchAlgorithmException, java.lang.Exception
- Throws:
java.security.NoSuchAlgorithmException
java.lang.Exception
-
getData
public byte[] getData(java.lang.String sha) throws java.lang.Exception
- Throws:
java.lang.Exception
-
markTransform
public void markTransform(java.io.File f) throws java.lang.Exception
- Throws:
java.lang.Exception
-
add
public java.lang.String add(java.io.File file) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-