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 filesystem. The path, type and sequence number of event
can be queried from this class.
For example if a file called "drew.dft" was newly created this class would provide the following values:
getPath() returns "/SDCard/tmp/drew.dft"
getUSN() returns 23 (denoting 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 Delete Event type; occurs when a file is remove 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 which this event corresponds to. |
|
String |
getOldPath()
Returns the associated path this event corresponds to before the event occurred. |
|
String |
getPath()
Returns the associated path that this event corresponds to. |
|
long |
getUSN()
Returns the USN (Update Sequence Number) for this event; this event is an increasing number since the
device was reset. |
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 Delete Event type; occurs when a file is remove 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 associated path that this event corresponds to. NOTE: The returned string does
not contain the "file://" protocol specifier and an escaped ASCII format as defined by RFC 2396.
- Returns:
- A String representing the path that a modification occurred on.
- 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 this event corresponds to before the event occurred. NOTE: The returned string does
not contain the "file://" protocol specifier and an escaped ASCII format as defined by RFC 2396.
- Returns:
- A String representing the path that a modification occurred on.
- 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 which this event corresponds to.
- Returns:
- An enumerated integer of value FILE_ADDED, FILE_DELETED, FILE_CHANGED or FILE_RENAMED.
- 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 USN (Update Sequence Number) for this event; this event is an increasing number since 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.