Skip to content

Commit

Permalink
Merge pull request #48 from cyverse/upload_rework
Browse files Browse the repository at this point in the history
do not truncate, but remove before upload to overwrite
  • Loading branch information
iychoi authored Sep 18, 2024
2 parents aafeaeb + 1b06ab4 commit fd31dd1
Show file tree
Hide file tree
Showing 9 changed files with 186 additions and 104 deletions.
2 changes: 1 addition & 1 deletion examples/download/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func main() {

logger.Infof("iRODS path: %q", result.IRODSPath)
logger.Infof("Local path: %q", result.LocalPath)
logger.Infof("Checksum: %s, iRODS: %q, Local: %q", result.CheckSumAlgorithm, hex.EncodeToString(result.IRODSCheckSum), hex.EncodeToString(result.LocalCheckSum))
logger.Infof("Checksum: iRODS: %s:%q, Local: %s:%q", result.IRODSCheckSumAlgorithm, hex.EncodeToString(result.IRODSCheckSum), result.LocalCheckSumAlgorithm, hex.EncodeToString(result.LocalCheckSum))
logger.Infof("Size: iRODS: %d, Local: %d", result.IRODSSize, result.LocalSize)

fsinfo, err := os.Stat(destPath)
Expand Down
2 changes: 1 addition & 1 deletion examples/download_parallel/download_parallel.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func main() {

logger.Infof("iRODS path: %q", result.IRODSPath)
logger.Infof("Local path: %q", result.LocalPath)
logger.Infof("Checksum: %s, iRODS: %q, Local: %q", result.CheckSumAlgorithm, hex.EncodeToString(result.IRODSCheckSum), hex.EncodeToString(result.LocalCheckSum))
logger.Infof("Checksum: iRODS: %s:%q, Local: %s:%q", result.IRODSCheckSumAlgorithm, hex.EncodeToString(result.IRODSCheckSum), result.LocalCheckSumAlgorithm, hex.EncodeToString(result.LocalCheckSum))
logger.Infof("Size: iRODS: %d, Local: %d", result.IRODSSize, result.LocalSize)

fsinfo, err := os.Stat(destPath)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func main() {

logger.Infof("iRODS path: %q", result.IRODSPath)
logger.Infof("Local path: %q", result.LocalPath)
logger.Infof("Checksum: %s, iRODS: %q, Local: %q", result.CheckSumAlgorithm, hex.EncodeToString(result.IRODSCheckSum), hex.EncodeToString(result.LocalCheckSum))
logger.Infof("Checksum: iRODS: %s:%q, Local: %s:%q", result.IRODSCheckSumAlgorithm, hex.EncodeToString(result.IRODSCheckSum), result.LocalCheckSumAlgorithm, hex.EncodeToString(result.LocalCheckSum))
logger.Infof("Size: iRODS: %d, Local: %d", result.IRODSSize, result.LocalSize)

fsinfo, err := os.Stat(destPath)
Expand Down
2 changes: 1 addition & 1 deletion examples/download_resumable/download_resumable.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func main() {

logger.Infof("iRODS path: %q", result.IRODSPath)
logger.Infof("Local path: %q", result.LocalPath)
logger.Infof("Checksum: %s, iRODS: %q, Local: %q", result.CheckSumAlgorithm, hex.EncodeToString(result.IRODSCheckSum), hex.EncodeToString(result.LocalCheckSum))
logger.Infof("Checksum: iRODS: %s:%q, Local: %s:%q", result.IRODSCheckSumAlgorithm, hex.EncodeToString(result.IRODSCheckSum), result.LocalCheckSumAlgorithm, hex.EncodeToString(result.LocalCheckSum))
logger.Infof("Size: iRODS: %d, Local: %d", result.IRODSSize, result.LocalSize)

fsinfo, err := os.Stat(destPath)
Expand Down
2 changes: 1 addition & 1 deletion examples/upload/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func main() {

logger.Infof("iRODS path: %q", result.IRODSPath)
logger.Infof("Local path: %q", result.LocalPath)
logger.Infof("Checksum: %s, iRODS: %q, Local: %q", result.CheckSumAlgorithm, hex.EncodeToString(result.IRODSCheckSum), hex.EncodeToString(result.LocalCheckSum))
logger.Infof("Checksum: iRODS: %s:%q, Local: %s:%q", result.IRODSCheckSumAlgorithm, hex.EncodeToString(result.IRODSCheckSum), result.LocalCheckSumAlgorithm, hex.EncodeToString(result.LocalCheckSum))
logger.Infof("Size: iRODS: %d, Local: %d", result.IRODSSize, result.LocalSize)

ttaken := time.Since(tstart)
Expand Down
2 changes: 1 addition & 1 deletion examples/upload_parallel/upload_parallel.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func main() {

logger.Infof("iRODS path: %q", result.IRODSPath)
logger.Infof("Local path: %q", result.LocalPath)
logger.Infof("Checksum: %s, iRODS: %q, Local: %q", result.CheckSumAlgorithm, hex.EncodeToString(result.IRODSCheckSum), hex.EncodeToString(result.LocalCheckSum))
logger.Infof("Checksum: iRODS: %s:%q, Local: %s:%q", result.IRODSCheckSumAlgorithm, hex.EncodeToString(result.IRODSCheckSum), result.LocalCheckSumAlgorithm, hex.EncodeToString(result.LocalCheckSum))
logger.Infof("Size: iRODS: %d, Local: %d", result.IRODSSize, result.LocalSize)

fsentry, err := filesystem.Stat(destPath)
Expand Down
Loading

0 comments on commit fd31dd1

Please sign in to comment.