syncthing/lib/osutil
Tommy van der Vorst de0b4270df
all: minimal set of changes for iOS app (#9619)
### Purpose

This PR contains the set of changes needed to make Syncthing work on iOS
for [my iOS app for
Syncthing](https://github.com/pixelspark/sushitrain).

Most changes originate from [the Mobius Sync
fork](http://github.com/MobiusSync/syncthing/tree/ios). I have removed
the changes from their fork that are not strictly needed for my app
(i.e. their changes to the GUI and command line utilities, for instance)
and squashed it all in a single commit.

In summary, the changes are:

* Resolve non-absolute paths to the 'Documents' folder (basically the
only one an app can/should write user data to by default on iOS)
* Tweaking of build flags/conditions for iOS (i.e. determine which
basicfs_watch, ignoreresult variant to build for iOS)
* Disable upgrade mechanism on iOS
* Make `RequestGlobal` and `PullerProgress` public symbols
* Expose syncthing.app's Model instance (app.M)
* Add no-op stub for SetLowPriority on iOS

I would very much appreciate these changes to be (eventually) merged to
mainline syncthing, as this would allow my iOS app to track the mainline
source code directly and removes the need (for me at least) for
maintaining a separate fork. Perhaps the Mobius folks can also benefit
from this (although as noted this branch does not contain their changes
to e.g. the GUI).

### Testing

This branch has been tested with the iOS app and appears to work fine.
The full set of MobiusSync changes has been used before with success.

### Screenshots

n/a

### Documentation

There should be no visible changes for users due to this set of changes.

---------

Co-authored-by: Simon Pickup <simon@pickupinfinity.com>
2024-07-31 07:31:14 +02:00
..
atomic_test.go all: use T.TempDir to create temporary test directory (#8280) 2022-04-15 07:44:06 +04:00
atomic_unix_test.go all: Remove usage of deprecated io/ioutil (#7971) 2021-11-22 08:59:47 +01:00
atomic.go Only fail after chmod error if permissions differ (e.g. on config file) (#8771) 2023-02-20 15:41:10 +01:00
filenames_darwin.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
filenames_unix.go all: Update build constraints to Go 1.17 style (#7894) 2021-08-17 10:10:41 +02:00
filenames_windows.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
hidden_unix.go all: Update build constraints to Go 1.17 style (#7894) 2021-08-17 10:10:41 +02:00
hidden_windows.go all: Update build constraints to Go 1.17 style (#7894) 2021-08-17 10:10:41 +02:00
lowprio_linux.go all: Modernize error wrapping (#8491) 2022-08-16 10:01:49 +02:00
lowprio_noop.go all: minimal set of changes for iOS app (#9619) 2024-07-31 07:31:14 +02:00
lowprio_unix.go all: minimal set of changes for iOS app (#9619) 2024-07-31 07:31:14 +02:00
lowprio_windows.go lib/osutil: Skip setLowPriority in Windows if already lower (fixes #6597) (#8993) 2023-07-21 04:38:15 +00:00
net.go lib/osutil, lib/upnp: Check FlagRunning (fixes #8767) (#9047) 2023-08-21 14:49:28 +00:00
osutil_test.go all: Grand test refactor (fixes #8779, fixes #8799) 2023-05-09 10:01:57 +00:00
osutil.go all: Add build constants for runtime.GOOS comparisons (#8442) 2022-07-28 19:36:39 +02:00
ping.go lib/dialer: Preserve nilness in error handling (fixes #6368) (#6369) 2020-02-26 13:16:18 +01:00
replacingwriter_test.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
replacingwriter.go all: Add build constants for runtime.GOOS comparisons (#8442) 2022-07-28 19:36:39 +02:00
rlimit_unix.go all: Add build constants for runtime.GOOS comparisons (#8442) 2022-07-28 19:36:39 +02:00
rlimit_windows.go all: Update build constraints to Go 1.17 style (#7894) 2021-08-17 10:10:41 +02:00
tempfile.go all: Convert folders to use filesystem abstraction 2017-08-19 14:36:56 +00:00
traversessymlink_test.go all: Grand test refactor (fixes #8779, fixes #8799) 2023-05-09 10:01:57 +00:00
traversessymlink.go lib: Prevent using protocol method with native path (fixes #7557) (#7563) 2021-04-11 15:29:43 +02:00