net.rim.device.api.io.file
Class FileSystemJournalEntry
java.lang.Object
net.rim.device.api.io.file.FileSystemJournalEntry
public final class FileSystemJournalEntry
- extends Object
This class represents a change event that occurs on a file system. The path,
type and sequence number of the event
can be queried from this class.
For example, for a file called drew.dft that is newly created, this class
might return the following values:
getPath() returns /SDCard/tmp/drew.dft
getUSN() returns 23, indicating that this is the 23rd change event to the file system since the device was reset
getEvent() returns FILE_ADDED
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.2.0
|
Field Summary |
|
static int |
FILE_ADDED
File Added event type; occurs when a file is added to the system. |
|
static int |
FILE_CHANGED
File Changed event type; occurs when a file is modified (written to or truncated). |
|
static int |
FILE_DELETED
File Deleted event type; occurs when a file is removed from the system. |
|
static int |
FILE_RENAMED
File Renamed event type; occurs when a file is renamed. |
|
Method Summary |
|
int |
getEvent()
Returns the type of event that this event corresponds to. |
|
String |
getOldPath()
Returns the associated path that this event corresponds to before the event occurred. |
|
String |
getPath()
Returns the path that this event corresponds to. |
|
long |
getUSN()
Returns the Update Sequence Number (USN) for this event. |
FILE_ADDED
public static final int FILE_ADDED
- File Added event type; occurs when a file is added to the system.
- See Also:
- Constant Field Values
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.2.0
FILE_DELETED
public static final int FILE_DELETED
- File Deleted event type; occurs when a file is removed from the system.
- See Also:
- Constant Field Values
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.2.0
FILE_CHANGED
public static final int FILE_CHANGED
- File Changed event type; occurs when a file is modified (written to or truncated).
- See Also:
- Constant Field Values
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.2.0
FILE_RENAMED
public static final int FILE_RENAMED
- File Renamed event type; occurs when a file is renamed.
- See Also:
- Constant Field Values
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.2.0
getPath
public String getPath()
- Returns the path that this event corresponds to.
The returned string does
not contain the "file://" protocol specifier and an escaped ASCII format as defined by RFC 2396.
- Returns:
- The path that a modification occurred in.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.2.0
getOldPath
public String getOldPath()
- Returns the associated path that this event corresponds to before the event occurred.
The returned string does
not contain the "file://" protocol specifier and an escaped ASCII format as defined by RFC 2396.
- Returns:
- The path that a modification occurred in.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.2.0
getEvent
public int getEvent()
- Returns the type of event that this event corresponds to.
- Returns:
- Returns one of the
FILE_ADDED, FILE_DELETED, FILE_CHANGED
or FILE_RENAMED events defined in this class. - Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.2.0
getUSN
public long getUSN()
- Returns the Update Sequence Number (USN) for this event.
The USN increments from the last time the
device was reset.
- Returns:
- The USN for this event.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.2.0
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.