File File Constructors

Definition

Overloads

File(URI) File(URI)

Constructs a new File using the path of the specified URI.

File(String) File(String)

Constructs a new file using the specified path.

File(File, String) File(File, String)

Constructs a new file using the specified directory and name.

File(IntPtr, JniHandleOwnership) File(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

File(String, String) File(String, String)

Constructs a new File using the specified directory path and file name, placing a path separator between the two.

File(URI) File(URI)

Constructs a new File using the path of the specified URI.

[Android.Runtime.Register(".ctor", "(Ljava/net/URI;)V", "")]
public File (Java.Net.URI uri);
new Java.IO.File : Java.Net.URI -> Java.IO.File

Parameters

uri
URI URI

Exceptions

if uri does not comply with the conditions above.

Remarks

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.

See also

File(String) File(String)

Constructs a new file using the specified path.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")]
public File (string pathname);
new Java.IO.File : string -> Java.IO.File

Parameters

pathname
String String

Exceptions

Remarks

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.

File(File, String) File(File, String)

Constructs a new file using the specified directory and name.

[Android.Runtime.Register(".ctor", "(Ljava/io/File;Ljava/lang/String;)V", "")]
public File (Java.IO.File parent, string child);
new Java.IO.File : Java.IO.File * string -> Java.IO.File

Parameters

parent
File File
child
String String

Exceptions

Remarks

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.

File(IntPtr, JniHandleOwnership) File(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected File (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Java.IO.File : nativeint * Android.Runtime.JniHandleOwnership -> Java.IO.File

Parameters

javaReference
IntPtr IntPtr

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

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.

File(String, String) File(String, String)

Constructs a new File using the specified directory path and file name, placing a path separator between the two.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/String;)V", "")]
public File (string parent, string child);
new Java.IO.File : string * string -> Java.IO.File

Parameters

parent
String String
child
String String

Exceptions

Remarks

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