FileUtils.Copy Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| Copy(FileDescriptor, FileDescriptor) |
Copy the contents of one FD to another. |
| Copy(Stream, Stream) |
Copy the contents of one stream to another. |
| Copy(FileDescriptor, FileDescriptor, CancellationSignal, IExecutor, FileUtils+IProgressListener) |
Copy the contents of one FD to another. Attempts to use several optimization strategies to copy the data in the kernel before falling back to a userspace copy as a last resort. |
| Copy(Stream, Stream, CancellationSignal, IExecutor, FileUtils+IProgressListener) |
Copy the contents of one stream to another. Attempts to use several optimization strategies to copy the data in the kernel before falling back to a userspace copy as a last resort. |
Copy(FileDescriptor, FileDescriptor)
Copy the contents of one FD to another.
[Android.Runtime.Register("copy", "(Ljava/io/FileDescriptor;Ljava/io/FileDescriptor;)J", "", ApiSince=29)]
public static long Copy(Java.IO.FileDescriptor in, Java.IO.FileDescriptor out);
[<Android.Runtime.Register("copy", "(Ljava/io/FileDescriptor;Ljava/io/FileDescriptor;)J", "", ApiSince=29)>]
static member Copy : Java.IO.FileDescriptor * Java.IO.FileDescriptor -> int64
Parameters
The value cannot be null.
- out
- FileDescriptor
The value cannot be null.
Returns
number of bytes copied.
- Attributes
Remarks
Copy the contents of one FD to another.
Attempts to use several optimization strategies to copy the data in the kernel before falling back to a userspace copy as a last resort.
Java documentation for android.os.FileUtils.copy(java.io.FileDescriptor, java.io.FileDescriptor).
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Copy(Stream, Stream)
Copy the contents of one stream to another.
[Android.Runtime.Register("copy", "(Ljava/io/InputStream;Ljava/io/OutputStream;)J", "", ApiSince=29)]
public static long Copy(System.IO.Stream in, System.IO.Stream out);
[<Android.Runtime.Register("copy", "(Ljava/io/InputStream;Ljava/io/OutputStream;)J", "", ApiSince=29)>]
static member Copy : System.IO.Stream * System.IO.Stream -> int64
Parameters
- in
- Stream
The value cannot be null.
- out
- Stream
The value cannot be null.
Returns
number of bytes copied.
- Attributes
Remarks
Copy the contents of one stream to another.
Attempts to use several optimization strategies to copy the data in the kernel before falling back to a userspace copy as a last resort.
Java documentation for android.os.FileUtils.copy(java.io.InputStream, java.io.OutputStream).
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Copy(FileDescriptor, FileDescriptor, CancellationSignal, IExecutor, FileUtils+IProgressListener)
Copy the contents of one FD to another. Attempts to use several optimization strategies to copy the data in the kernel before falling back to a userspace copy as a last resort.
[Android.Runtime.Register("copy", "(Ljava/io/FileDescriptor;Ljava/io/FileDescriptor;Landroid/os/CancellationSignal;Ljava/util/concurrent/Executor;Landroid/os/FileUtils$ProgressListener;)J", "", ApiSince=29)]
public static long Copy(Java.IO.FileDescriptor in, Java.IO.FileDescriptor out, Android.OS.CancellationSignal? signal, Java.Util.Concurrent.IExecutor? executor, Android.OS.FileUtils.IProgressListener? listener);
[<Android.Runtime.Register("copy", "(Ljava/io/FileDescriptor;Ljava/io/FileDescriptor;Landroid/os/CancellationSignal;Ljava/util/concurrent/Executor;Landroid/os/FileUtils$ProgressListener;)J", "", ApiSince=29)>]
static member Copy : Java.IO.FileDescriptor * Java.IO.FileDescriptor * Android.OS.CancellationSignal * Java.Util.Concurrent.IExecutor * Android.OS.FileUtils.IProgressListener -> int64
Parameters
The value cannot be null.
- out
- FileDescriptor
The value cannot be null.
- signal
- CancellationSignal
to signal if the copy should be cancelled early. The value may be null.
- executor
- IExecutor
that listener events should be delivered via. The value may be null.
- listener
- FileUtils.IProgressListener
to be periodically notified as the copy progresses. The value may be null.
Returns
number of bytes copied.
- Attributes
Remarks
Copy the contents of one FD to another. Attempts to use several optimization strategies to copy the data in the kernel before falling back to a userspace copy as a last resort.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Copy(Stream, Stream, CancellationSignal, IExecutor, FileUtils+IProgressListener)
Copy the contents of one stream to another. Attempts to use several optimization strategies to copy the data in the kernel before falling back to a userspace copy as a last resort.
[Android.Runtime.Register("copy", "(Ljava/io/InputStream;Ljava/io/OutputStream;Landroid/os/CancellationSignal;Ljava/util/concurrent/Executor;Landroid/os/FileUtils$ProgressListener;)J", "", ApiSince=29)]
public static long Copy(System.IO.Stream in, System.IO.Stream out, Android.OS.CancellationSignal? signal, Java.Util.Concurrent.IExecutor? executor, Android.OS.FileUtils.IProgressListener? listener);
[<Android.Runtime.Register("copy", "(Ljava/io/InputStream;Ljava/io/OutputStream;Landroid/os/CancellationSignal;Ljava/util/concurrent/Executor;Landroid/os/FileUtils$ProgressListener;)J", "", ApiSince=29)>]
static member Copy : System.IO.Stream * System.IO.Stream * Android.OS.CancellationSignal * Java.Util.Concurrent.IExecutor * Android.OS.FileUtils.IProgressListener -> int64
Parameters
- in
- Stream
The value cannot be null.
- out
- Stream
The value cannot be null.
- signal
- CancellationSignal
to signal if the copy should be cancelled early. The value may be null.
- executor
- IExecutor
that listener events should be delivered via. The value may be null.
- listener
- FileUtils.IProgressListener
to be periodically notified as the copy progresses. The value may be null.
Returns
number of bytes copied.
- Attributes
Remarks
Copy the contents of one stream to another. Attempts to use several optimization strategies to copy the data in the kernel before falling back to a userspace copy as a last resort.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.