Commit Graph
34 Commits
Author SHA1 Message Date
Kenneth Skovhede 3501cdee08 Added sharepoint from #3124 2024-03-01 14:45:31 +01:00
Kenneth Skovhede aa20088c39 Tool based upgrade of all projects with some manual update 2024-03-01 14:29:54 +01:00
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
Kenneth Hsu de2a651763 Fix bug in PutAsync implementations.
Without await, the using statement can dispose the Stream before the
call to PutAsync completes, resulting in an ObjectDisposedException.

This fixes #4556.
2021-06-12 15:12:13 -07:00
Kenneth Hsu 83ac03843d Fix spelling errors in comments.
In doing so, we also normalized some line endings.
2019-12-14 09:52:55 -08:00
Kenneth Hsu b13f2644ea Remove unused property. 2019-06-11 19:44:25 -07:00
Sean Templeton b02b19e683 Change Put method name to PutAsync 2019-03-17 18:28:45 -05:00
Sean Templeton 8bd4b825c8 Fix several Codacy issues 2019-03-13 21:51:05 -05:00
Sean Templeton c05f304fd7 Update S3, Sharepoint, Tahoe, and WEBDAV backends for async Put 2019-03-05 21:25:35 -06:00
Sean Templeton 0c122ff550 Change IBackend and IStreamingBackend to return Task for Put() 2019-03-03 21:43:10 -06:00
Kenneth Hsu b7f28aa9f9 Remove empty finally blocks.
Empty finally blocks serve no purpose.  In cases where no exceptions are
caught, we removed the try as well.
2018-12-31 14:00:43 -08:00
verhoek b2cc18426c Renamed Library.IO to Library.Common.IO.
Moved basic Platform functions to Library.Common.Platform.
Turned IO_OS into property within Library.Common.
2018-11-02 21:34:07 +01:00
verhoek bc053df294 Moved basic IO helper functions to Library.IO. 2018-10-27 12:17:07 +02:00
Kenneth Hsu d4d1945faf Use utility method to append trailing slash.
This removes some duplicated code.
2018-09-22 10:19:45 -07:00
Kenneth Hsu 08a897d7b0 Remove redundant calls to ToString. 2018-06-04 20:15:34 -07:00
Kenneth Hsu f12858e6a5 Mark fields that shouldn't be reassigned as readonly.
This makes it explicit at compile-time that these fields should not be
reassigned outside the constructor.
2018-05-25 10:04:52 -07:00
Kenneth Hsu 0b016cea2c Replace string concatenation with StringBuilder.
When appending to a string in a loop, using a StringBuilder should in
general yield better performance.
2018-05-19 15:36:00 -07:00
Kenneth Hsu 1f8b542604 Use nameof operator when constructing ArgumentNullException.
This will make rename refactorings easier in the future.
2018-03-07 17:53:08 -08:00
Kenneth Skovhede bd863016fa Added support for returning multiple DNS names for cache invalidation.
Updated most backends to return the actual DNS names for cache invalidation.
2018-02-26 11:37:10 +01:00
Rune Henriksen fc77b476fc changed from NYI to null returns. Added check to skip DNS check if no DNSName is provided 2018-02-21 22:38:01 +01:00
Rune Henriksen 00292953c3 added DNSName getter on Backend interface and added NotImplementedException methods on each backend class 2018-02-18 00:18:44 +01:00
Kenneth Skovhede c54ef9c376 Adds a UserAgent header to OD4B as suggested in #2475 may also work for #2474 2018-01-18 11:44:04 +01:00
Kenneth Hsu 1c7391399d Remove XML documentation for unmatched parameters. 2017-12-09 18:30:01 -08:00
Kenneth Hsu 8810e0130d Make string comparisons use ordinal (binary) sort rules.
These string comparisons should not be culture-aware.
2017-11-26 11:19:54 -08:00
Tyler Gill b3a3911d98 Change from wrapping yield returning methods with methods that do a try/catch, since they don't work due to lazy evaluation. 2017-09-25 23:19:31 -06:00
Tyler Gill 38883285ee Change IBackend.List() to return IEnumerable instead of List
By changing to IEnumerable, it is possible to iterate only a portion of the list, which is useful when not all entries are needed (e.g., when testing a connection).
All existing backends have been updated, and any which were able to be changed to yield return results in a straightforward way now do.
Many backends had a try/catch in the List() method. Due to the fact that yield returns can't be placed within a try/catch block, these have been refactored to either scope the try/catch to the parts that (should) be the only places throwing exceptions, so that exceptions are still caught and handled.
Note that lazy evaluation may cause some changes in behavior - exceptions that were previously thrown at the point of invokation of List() may now be thrown while it is being enumerated.
I believe this will not be problematic though, as the only well-known exception seems to be FolderMissingException, which should be thrown by Test(), but TestList() attempts to enumerate the list to force this exception.
Any places that require the legacy behavior can get it by simply converting the lazy enumerable to a List()
2017-09-25 23:17:45 -06:00
Tyler Gill 83a1dcfb64 Replace all instances of InvariantCultureIgnoreCase with OrdinalIgnoreCase in string comparisons.
InvariantCulture is useful when comparing / sorting human language strings in a culturely correct way. It handles things like accented letters in a way that makes sense to humans (e.g., 'a' should be sorted next to 'á', rather than after 'z').
Ordinal looks just at the raw code points of the characters. As such, it is recommended for use in cases when comparing system strings (file paths, command line parameters, config settings, etc.). Since it doesn't need to use the culture specific sorting rules, this method can often be faster.

For more information, see https://stackoverflow.com/questions/492799/difference-between-invariantculture-and-ordinal-string-comparison (and other related questions)
2017-09-18 23:55:08 -06:00
Kenneth Skovhede 0c68daff6c Fixed all whitespace to be 4 spaces instead of tabs 2016-09-15 11:39:27 +02:00
FootStark e63e82eec6 Chunked uploads to SharePoint w non-seekable streams
Chunked uploads to Sharepoint as suggested by @ReneHezser
Added options for fine-grained control:
web-timeout, binary-direct-mode, chunk-size
2016-05-16 17:46:29 +02:00
René Hézser 058a303ac9 Upload files in chunks to prevent timeouts on large files 2016-04-23 18:59:59 +02:00
FootStark d0924a2104 Added option delete-to-recycler 2016-03-22 21:10:04 +01:00
FootStark f82db9ec1a Streamlining. Added separate OneDriveForBusiness backen 2016-03-22 20:05:36 +01:00
FootStark 8418f0dcda Error handling, removed nuget-pkg for SP.CSOM 2016-03-22 19:28:05 +01:00
FootStark 74742669f5 BaseVersion SharePoint Backend 2016-03-22 00:49:16 +01:00