ch.qos.logback.core.android
Class CommonPathUtil

java.lang.Object
  extended by ch.qos.logback.core.android.CommonPathUtil

public abstract class CommonPathUtil
extends Object

This class provides utility methods to get common paths on the Android filessytem.

Since:
1.0.8-1
Author:
Anthony Trinh

Constructor Summary
CommonPathUtil()
           
 
Method Summary
static String getAssetsDirectoryPath()
          Gets the relative path to the assets directory within the jar
static String getExternalStorageDirectoryPath()
          Gets the path to the external storage directory
static String getFilesDirectoryPath(String packageName)
          Returns the absolute path to the directory on the Android filesystem where files are stored for the current application.
static String getMountedExternalStorageDirectoryPath()
          Gets the path to the external storage directory only if mounted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonPathUtil

public CommonPathUtil()
Method Detail

getMountedExternalStorageDirectoryPath

public static String getMountedExternalStorageDirectoryPath()
Gets the path to the external storage directory only if mounted.

Returns:
the absolute path to the external storage directory; or null if not mounted.

getExternalStorageDirectoryPath

public static String getExternalStorageDirectoryPath()
Gets the path to the external storage directory

Returns:
the absolute path to the external storage directory

getFilesDirectoryPath

public static String getFilesDirectoryPath(String packageName)
Returns the absolute path to the directory on the Android filesystem where files are stored for the current application. Unlike the equivalent function in Android, this function does not create the directory if it's non-existent.

Parameters:
packageName - name of the application package
Returns:
the absolute path to the files directory (example: "/data/data/com.example/files")

getAssetsDirectoryPath

public static String getAssetsDirectoryPath()
Gets the relative path to the assets directory within the jar

Returns:


Copyright © 2005-2013 QOS.ch. All Rights Reserved.