Object FileUtils

  • All Implemented Interfaces:

    
    public class FileUtils
    
                        

    Contains helper methods for working with files and directories

    • Constructor Detail

    • Method Detail

      • getExternalFilesDirOrShowError

         final static File getExternalFilesDirOrShowError(Context context, String directoryName)

        Returns external directory with provided name (creates if needed). On failure shows toast message.

        Parameters:
        directoryName - name of the directory being created
      • getExternalStorageDirOrShowError

         final static File getExternalStorageDirOrShowError(String directoryName)

        Returns external directory with provided name (creates if needed). On failure shows toast message.

        Parameters:
        directoryName - name of the directory being created
      • getAppFilesDirOrShowError

         final static File getAppFilesDirOrShowError(Context context, String directoryName)

        Returns the application (internal or external) directory with provided name (creates if needed). On failure shows toast message.

        Parameters:
        directoryName - name of the directory being created
      • getExternalCacheDirOrShowError

         final static File getExternalCacheDirOrShowError(Context context, String directoryName)

        Returns external cache directory with provided name (creates if needed). On failure shows toast message.

        Parameters:
        directoryName - name of the directory being created
      • getFilesDirOrShowError

         final static File getFilesDirOrShowError(String parentDirPath, String directoryName)

        Returns directory with provided path (creates if needed). On failure shows toast message.

        Parameters:
        parentDirPath - path to the parent directory
        directoryName - name of the directory being created