Nick Craig-Wood
753b0717be
Refactor the List and ListDir interface
...
Gives more accurate error propagation, control of depth of recursion
and short circuit recursion where possible.
Most of the the heavy lifting is done in the "fs" package, making file
system implementations a bit simpler.
This commit contains some code originally by Klaus Post.
Fixes #316
2016-05-06 16:52:34 +01:00
Nick Craig-Wood
d205dc23e9
Fix oddities using a file in the root - fixes #471
...
* Check return from NewFsObject which caused nil ptr deref
* Correct root directory from "" to string(os.PathSeparator) in getDirFile
2016-05-06 13:52:50 +01:00
Nick Craig-Wood
7c01bbddf8
Normalise path names for OSX local filesystem
...
Fixes #194 Fixes #451 Fixes #463
2016-05-01 13:13:20 +01:00
Nick Craig-Wood
414b35ea56
Change the interface of SetModTime to return an error - #348
2016-03-22 15:56:44 +00:00
Klaus Post
e57c4406f3
Add mutex to "warned" map.
...
Fixes #385
2016-03-10 15:51:56 +01:00
Nick Craig-Wood
88cca8a6eb
Simplify literals (after running gofmt -s over the code)
2016-02-29 16:57:23 +00:00
Nick Craig-Wood
e08e35984c
Add help to remote chooser in rclone config - fixes #43
2016-02-21 13:40:16 +00:00
klauspost
ef06371c93
Create separate interface for object information.
...
Take out read-only information about a Fs in a separate struct to limit access.
See discussion at #282 .
2016-02-19 13:31:09 +00:00
Nick Craig-Wood
d0678bc3e5
local: report error on stat in Hash in case file disappeared
2016-01-17 10:46:19 +00:00
klauspost
78c3a5ccfa
Add support for multiple hash types.
...
Add support for multiple hash types with negotiation of common hash types for comparison.
Manually rebased version of #277 (see discussion there)
2016-01-11 13:39:33 +01:00
klauspost
3c31d711b3
Add local file system option to disable UNC on Windows.
...
This will add an option to disable UNC conversion on Windows to deal with buggy file system implementations like EncFS.
Fixes #261
2016-01-05 17:08:11 +00:00
Nick Craig-Wood
b257de4aba
Be more constistent with naming in remotes
...
* External objects are called Fs and Object
* Object.fs always points to the Fs
2015-11-07 11:14:46 +00:00
klauspost
16c9fba5de
Fix tests failing on Windows.
...
* ":" is kept when part of a drive.
* Create tests.
* Fix test framework.
2015-10-19 17:36:15 +01:00
klauspost
ab9f521cbd
Allow '&' and disallow ':' in Windows filenames.
...
Fixes #161
2015-10-05 11:04:25 +02:00
Nick Craig-Wood
e9c915e6fe
Fix golint warnings
2015-09-22 18:47:16 +01:00
klauspost
3234c28f7c
Minor adjustments to Unc path conversion function.
2015-09-17 18:42:10 +01:00
klauspost
f50f353b5d
local: always use UNC paths on Windows - fixes #124 , fixes #130 , fixes #90
...
* Convert all paths to UNC paths on Windows.
* Update local filesystem to always use UNC paths.
* Change tests, so they can work with Windows character replacements.
* Remove "/" suffix on paths.
* Always use path/filepath
2015-09-14 19:58:03 +01:00
Nick Craig-Wood
e2717a031e
Implement Mover and DirMover interfaces fixes #115
...
* unit tests
* local
* drive
* dropbox
2015-09-01 21:49:13 +01:00
Nick Craig-Wood
92745aa950
Add Root() to Fs interface
2015-09-01 21:49:13 +01:00
Nick Craig-Wood
fedf81c2b7
Add Name() to Fs interface to return name as passed to NewFs
2015-08-23 13:36:38 +01:00
Leonid Shalupov
3fcff32524
do not print stats in quiet mode - fixes #70
...
...unless had some errors or stats interval requested.
Add fs.ErrorLog to differentiate between Logs which should be
suppressed and errors which shouldn't.
2015-08-10 11:17:54 +01:00
Nick Craig-Wood
f55359b3ac
Fix created directories not obeying umask
2015-07-29 10:21:12 +01:00
Nick Craig-Wood
870a9fc3b2
local: fix encoding of non utf-8 file names - fixes #66
2015-05-21 18:40:16 +01:00
Nick Craig-Wood
d64a37772f
local: Fix directory separators on Windows - fixes #24
2015-02-07 22:32:51 +00:00
Nick Craig-Wood
c389616657
all: make private functions / variables / constant which shouldn't be public
2014-07-29 17:50:07 +01:00
Nick Craig-Wood
2f9f9afac2
fs: Document that Purger returns error on empty directory, test and fix
2014-07-29 17:18:22 +01:00
Nick Craig-Wood
17ffb0855f
Fixes after running errcheck
2014-07-25 18:19:49 +01:00
Nick Craig-Wood
1660903aa2
local: fix unit tests
...
* Change log.Printf into fs.Log
* Re-read metadata on SetModtime
2014-07-24 23:13:33 +01:00
Nick Craig-Wood
02d50f8c6e
local: remove annoying debug message
2014-07-22 23:06:01 +01:00
Nick Craig-Wood
1527e64ee7
local: Implement Purger interface
2014-07-19 13:05:01 +01:00
Nick Craig-Wood
f7652db4f1
local: Make sure info is never nil
2014-07-19 11:50:11 +01:00
Nick Craig-Wood
8b75fb14c5
local: calculate md5sum on Read or Update since we check it in Copy()
2014-07-19 11:06:25 +01:00
Nick Craig-Wood
99695d57ab
Implement single file operations for all file systems
2014-05-05 22:17:57 +01:00
Nick Craig-Wood
02afcb00e9
Factor Fs.Put into Object.Update and call Update rather than Put if possible
2014-04-18 17:49:01 +01:00
Nick Craig-Wood
92ec29fe3f
Factor the generic code into fs and add some more intefaces
2014-03-28 22:26:42 +00:00
Nick Craig-Wood
2e5f0ef258
Rename filing systems modules (so I can tell them apart in emacs buffers!)
2014-03-16 10:09:55 +00:00