Android java path class

Paths Class

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.

This class consists exclusively of static methods that return a Path by converting a path string or URI .

[Android.Runtime.Register("java/nio/file/Paths", ApiSince=26, DoNotGenerateAcw=true)] public sealed class Paths : Java.Lang.Object
[] type Paths = class inherit Object

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.

Properties

Returns the runtime class of this Object .

The handle to the underlying Android instance.

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Methods

Creates and returns a copy of this object.

Indicates whether some other object is «equal to» this one.

Converts a path string, or a sequence of strings that when joined form a path string, to a Path .

Converts the given URI to a Path object.

Returns a hash code value for the object.

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

Wakes up a single thread that is waiting on this object’s monitor.

Wakes up all threads that are waiting on this object’s monitor.

Returns a string representation of the object.

Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object.

Causes the current thread to wait until either another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object, or a specified amount of time has elapsed.

Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

Performs an Android runtime-checked type conversion.

Источник

The Path Class

The Path class, introduced in the Java SE 7 release, is one of the primary entrypoints of the java.nio.file package. If your application uses file I/O, you will want to learn about the powerful features of this class.

Version Note: If you have pre-JDK7 code that uses java.io.File , you can still take advantage of the Path class functionality by using the File.toPath method. See Legacy File I/O Code for more information.

As its name implies, the Path class is a programmatic representation of a path in the file system. A Path object contains the file name and directory list used to construct the path, and is used to examine, locate, and manipulate files.

A Path instance reflects the underlying platform. In the Solaris OS, a Path uses the Solaris syntax ( /home/joe/foo ) and in Microsoft Windows, a Path uses the Windows syntax ( C:\home\joe\foo ). A Path is not system independent. You cannot compare a Path from a Solaris file system and expect it to match a Path from a Windows file system, even if the directory structure is identical and both instances locate the same relative file.

The file or directory corresponding to the Path might not exist. You can create a Path instance and manipulate it in various ways: you can append to it, extract pieces of it, compare it to another path. At the appropriate time, you can use the methods in the Files class to check the existence of the file corresponding to the Path , create the file, open it, delete it, change its permissions, and so on.

The next page examines the Path class in detail.

Источник

Читайте также:  Php выбрать последний символ строки
Оцените статью