Implement Precision interface in all filesystems

* drive: add mime type on upload
  * drive: correct info on upload to fix crash
  * local: measure time precision by making a local file and using Chtimes
  * swift: move snet parameter here
  * core: add -modify-window and compute the optimum one
  * core: use modify window when checking times
This commit is contained in:
Nick Craig-Wood
2013-01-18 23:21:02 +00:00
parent b41367856b
commit f8246b5a7e
7 changed files with 127 additions and 11 deletions

View File

@ -39,6 +39,7 @@ var (
authUrl = flag.String("auth", os.Getenv("ST_AUTH"), "Auth URL for server. Defaults to environment var ST_AUTH.")
userName = flag.String("user", os.Getenv("ST_USER"), "User name. Defaults to environment var ST_USER.")
apiKey = flag.String("key", os.Getenv("ST_KEY"), "API key (password). Defaults to environment var ST_KEY.")
snet = flag.Bool("snet", false, "Use internal service network") // FIXME not implemented
)
// String converts this FsSwift to a string
@ -200,6 +201,11 @@ func (f *FsSwift) Rmdir() error {
return f.c.ContainerDelete(f.container)
}
// Return the precision
func (fs *FsSwift) Precision() time.Duration {
return time.Nanosecond
}
// ------------------------------------------------------------
// Return the remote path