Java.IO.File Members

The members of Java.IO.File are listed below.

See Also: Inherited members from Java.Lang.Object

Public Constructors

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

Protected Constructors

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

Public Properties

[read-only]
AbsoluteFileFile. Returns a new file constructed using the absolute path of this file.
[read-only]
AbsolutePathstring. Returns the absolute path of this file.
[read-only]
CanonicalFileFile. Returns a new file created using the canonical path of this file.
[read-only]
CanonicalPathstring. Returns the canonical path of this file.
[read-only]
FreeSpacelong. Returns the number of free bytes on the partition containing this path.
[read-only]
IsAbsolutebool. Indicates if this file's pathname is absolute.
[read-only]
IsDirectorybool. Indicates if this file represents a directory on the underlying file system.
[read-only]
IsFilebool. Indicates if this file represents a file on the underlying file system.
[read-only]
IsHiddenbool. Returns whether or not this file is a hidden file as defined by the operating system.
[read-only]
Namestring. Returns the name of the file or directory represented by this file.
[read-only]
Parentstring. Returns the pathname of the parent of this file.
[read-only]
ParentFileFile. Returns a new file made from the pathname of the parent of this file.
[read-only]
Pathstring. Returns the path of this file.
[read-only]
static
PathSeparatorstring. The system-dependent string used to separate components in search paths (":").
[read-only]
static
PathSeparatorCharchar. The system-dependent character used to separate components in search paths (':').
[read-only]
static
Separatorstring. The system-dependent string used to separate components in filenames ('/').
[read-only]
static
SeparatorCharchar. The system-dependent character used to separate components in filenames ('/').
[read-only]
TotalSpacelong. Returns the total size in bytes of the partition containing this path.
[read-only]
UsableSpacelong. Returns the number of usable free bytes on the partition containing this path.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

CanExecute() : bool
Tests whether or not this process is allowed to execute this file.
CanRead() : bool
Indicates whether the current context is allowed to read from this file.
CanWrite() : bool
Indicates whether the current context is allowed to write to this file.
CompareTo(File) : int
Returns the relative sort ordering of the paths for this file and the file another.
CreateNewFile() : bool
Creates a new, empty file on the file system according to the path information stored in this file.
static
CreateTempFile(string, string) : File
Creates an empty temporary file using the given prefix and suffix as part of the file name.
static
CreateTempFile(string, string, File) : File
Creates an empty temporary file in the given directory using the given prefix and suffix as part of the file name.
Delete() : bool
Deletes this file.
DeleteOnExit()
Schedules this file to be automatically deleted when the VM terminates normally.
Exists() : bool
Returns a boolean indicating whether this file can be found on the underlying file system.
LastModified() : long
Returns the time when this file was last modified, measured in milliseconds since January 1st, 1970, midnight.
Length() : long
Returns the length of this file in bytes.
List() : string[]
Returns an array of strings with the file names in the directory represented by this file.
List(IFilenameFilter) : string[]
Gets a list of the files in the directory represented by this file.
ListAsync() : System.Threading.Tasks.Task<String[]>
Documentation for this section has not yet been entered.
ListAsync(IFilenameFilter) : System.Threading.Tasks.Task<String[]>
Documentation for this section has not yet been entered.
ListFiles() : File[]
Returns an array of files contained in the directory represented by this file.
ListFiles(IFileFilter) : File[]
Gets a list of the files in the directory represented by this file.
ListFiles(IFilenameFilter) : File[]
Gets a list of the files in the directory represented by this file.
ListFilesAsync() : System.Threading.Tasks.Task<File[]>
Documentation for this section has not yet been entered.
ListFilesAsync(IFileFilter) : System.Threading.Tasks.Task<File[]>
Documentation for this section has not yet been entered.
ListFilesAsync(IFilenameFilter) : System.Threading.Tasks.Task<File[]>
Documentation for this section has not yet been entered.
static
ListRoots() : File[]
Returns the file system roots.
static
ListRootsAsync() : System.Threading.Tasks.Task<File[]>
Documentation for this section has not yet been entered.
Mkdir() : bool
Creates the directory named by this file, assuming its parents exist.
Mkdirs() : bool
Creates the directory named by this file, creating missing parent directories if necessary.
RenameTo(File) : bool
Renames this file to newPath.
SetExecutable(bool) : bool
Equivalent to setExecutable(executable, true).
SetExecutable(bool, bool) : bool
Manipulates the execute permissions for the abstract path designated by this file.
SetLastModified(long) : bool
Sets the time this file was last modified, measured in milliseconds since January 1st, 1970, midnight.
SetReadable(bool) : bool
Equivalent to setReadable(readable, true).
SetReadable(bool, bool) : bool
Manipulates the read permissions for the abstract path designated by this file.
SetReadOnly() : bool
Equivalent to setWritable(false, false).
SetWritable(bool) : bool
Equivalent to setWritable(writable, true).
SetWritable(bool, bool) : bool
Manipulates the write permissions for the abstract path designated by this file.
ToURI() : Java.Net.URI
Returns a Uniform Resource Identifier for this file.
ToURL() : Java.Net.URL
Returns a Uniform Resource Locator for this file.

Explicitly Implemented Interface Members

Java.Lang.IComparable.CompareToDocumentation for this section has not yet been entered.