|
|
@ -10,9 +10,7 @@ public class SyncFile extends File {
|
|
|
|
public long timeModifiedFromStateFile = 0;
|
|
|
|
public long timeModifiedFromStateFile = 0;
|
|
|
|
|
|
|
|
|
|
|
|
public String relativePath;
|
|
|
|
public String relativePath;
|
|
|
|
private SyncDirectory sd;
|
|
|
|
private final SyncDirectory sd;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public SyncFile(SyncDirectory sd, String pathname) {
|
|
|
|
public SyncFile(SyncDirectory sd, String pathname) {
|
|
|
|
|
|
|
|
|
|
|
@ -21,15 +19,10 @@ public class SyncFile extends File {
|
|
|
|
relativePath = this.getPath().replace(sd.path, "");
|
|
|
|
relativePath = this.getPath().replace(sd.path, "");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setTimeModifiedFromStateFile(long value) {
|
|
|
|
public void setTimeModifiedFromStateFile(long value) {
|
|
|
|
timeModifiedFromStateFile = value;
|
|
|
|
timeModifiedFromStateFile = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public long getTimeModifiedFromStateFile() {
|
|
|
|
public long getTimeModifiedFromStateFile() {
|
|
|
|
SyncFile record = sd.readStateFile().get(this.getPath());
|
|
|
|
SyncFile record = sd.readStateFile().get(this.getPath());
|
|
|
|
|
|
|
|
|
|
|
@ -37,7 +30,6 @@ public class SyncFile extends File {
|
|
|
|
return record == null ? 0 : record.timeModifiedFromStateFile;
|
|
|
|
return record == null ? 0 : record.timeModifiedFromStateFile;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* If File exists on Disk get the TimeModified from there.
|
|
|
|
* If File exists on Disk get the TimeModified from there.
|
|
|
|
* Else try to read it from StateFile.
|
|
|
|
* Else try to read it from StateFile.
|
|
|
@ -54,10 +46,6 @@ public class SyncFile extends File {
|
|
|
|
if (sd.readStateFile().get(this.getPath())!=null){
|
|
|
|
if (sd.readStateFile().get(this.getPath())!=null){
|
|
|
|
return getTimeModifiedFromStateFile();
|
|
|
|
return getTimeModifiedFromStateFile();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|