# Functions
Copy copies the file content from source to destination.
CreateAtomic is like os.Create, except a temporary file name is used instead of the given name.
CreateAtomicFilesystem is like os.Create, except a temporary file name is used instead of the given name.
DebugSymlinkForTestsOnly is not and should not be used in Syncthing code, hence the cumbersome name to make it obvious if this ever leaks.
No description provided by the author
GetLatencyForURL parses the given URL, tries opening a TCP connection to it and returns the time it took to establish the connection.
No description provided by the author
InWritableDir calls fn(path), while making sure that the directory containing `path` is writable for the duration of the call.
No description provided by the author
MaximizeOpenFileLimit tries to set the resource limit RLIMIT_NOFILE (number of open file descriptors) to the max (hard limit), if the current (soft limit) is below the max.
No description provided by the author
No description provided by the author
Rename moves a temporary file to its final place.
ResolveInterfaceAddresses returns available addresses of the given network type for a given interface.
SetLowPriority lowers the process CPU scheduling priority, and possibly I/O priority depending on the platform and OS.
TCPPing returns the duration required to establish a TCP connection to the given host.
TempFile creates a new temporary file in the directory dir with a name beginning with prefix, opens the file for reading and writing, and returns the resulting *os.File.
TraversesSymlink returns an error if any path component of name (including name itself) traverses a symlink.
TryRename renames a file, leaving source file intact in case of failure.
# Structs
An AtomicWriter is an *os.File that writes to a temporary file in the same directory as the final path.
NotADirectoryError is an error indicating an expected path is not a directory.
No description provided by the author
TraversesSymlinkError is an error indicating symlink traversal.