dz.java 2.66 KB
import android.content.Context;
import android.net.Uri;
import android.provider.DocumentsContract;
import android.support.v4.provider.DocumentFile;

public final class dz
  extends DocumentFile
{
  private Context a;
  private Uri b;
  
  public dz(DocumentFile paramDocumentFile, Context paramContext, Uri paramUri)
  {
    super(paramDocumentFile);
    this.a = paramContext;
    this.b = paramUri;
  }
  
  public final boolean canRead()
  {
    return dv.e(this.a, this.b);
  }
  
  public final boolean canWrite()
  {
    return dv.f(this.a, this.b);
  }
  
  public final DocumentFile createDirectory(String paramString)
  {
    paramString = dw.a(this.a, this.b, "vnd.android.document/directory", paramString);
    if (paramString != null) {
      return new dz(this, this.a, paramString);
    }
    return null;
  }
  
  public final DocumentFile createFile(String paramString1, String paramString2)
  {
    paramString1 = dw.a(this.a, this.b, paramString1, paramString2);
    if (paramString1 != null) {
      return new dz(this, this.a, paramString1);
    }
    return null;
  }
  
  public final boolean delete()
  {
    return dv.g(this.a, this.b);
  }
  
  public final boolean exists()
  {
    return dv.h(this.a, this.b);
  }
  
  public final String getName()
  {
    return dv.a(this.a, this.b, "_display_name");
  }
  
  public final String getType()
  {
    return dv.b(this.a, this.b);
  }
  
  public final Uri getUri()
  {
    return this.b;
  }
  
  public final boolean isDirectory()
  {
    return dv.c(this.a, this.b);
  }
  
  public final boolean isFile()
  {
    return dv.d(this.a, this.b);
  }
  
  public final boolean isVirtual()
  {
    return dv.a(this.a, this.b);
  }
  
  public final long lastModified()
  {
    return dv.b(this.a, this.b, "last_modified");
  }
  
  public final long length()
  {
    return dv.b(this.a, this.b, "_size");
  }
  
  public final DocumentFile[] listFiles()
  {
    Uri[] arrayOfUri = dw.a(this.a, this.b);
    DocumentFile[] arrayOfDocumentFile = new DocumentFile[arrayOfUri.length];
    int i = 0;
    while (i < arrayOfUri.length)
    {
      arrayOfDocumentFile[i] = new dz(this, this.a, arrayOfUri[i]);
      i += 1;
    }
    return arrayOfDocumentFile;
  }
  
  public final boolean renameTo(String paramString)
  {
    Context localContext = this.a;
    Uri localUri = this.b;
    paramString = DocumentsContract.renameDocument(localContext.getContentResolver(), localUri, paramString);
    if (paramString != null)
    {
      this.b = paramString;
      return true;
    }
    return false;
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/dz.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */