123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314 |
- .class final Lokhttp3/internal/io/FileSystem$1;
- .super Ljava/lang/Object;
- .source ""
- # interfaces
- .implements Lokhttp3/internal/io/FileSystem;
- # annotations
- .annotation system Ldalvik/annotation/EnclosingClass;
- value = Lokhttp3/internal/io/FileSystem;
- .end annotation
- .annotation system Ldalvik/annotation/InnerClass;
- accessFlags = 0x0
- name = null
- .end annotation
- # direct methods
- .method constructor <init>()V
- .locals 0
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- return-void
- .end method
- # virtual methods
- .method public appendingSink(Ljava/io/File;)Lokio/Sink;
- .locals 1
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/FileNotFoundException;
- }
- .end annotation
- :try_start_0
- invoke-static {p1}, Lokio/Okio;->appendingSink(Ljava/io/File;)Lokio/Sink;
- move-result-object p1
- :try_end_0
- .catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
- return-object p1
- :catch_0
- invoke-virtual {p1}, Ljava/io/File;->getParentFile()Ljava/io/File;
- move-result-object v0
- invoke-virtual {v0}, Ljava/io/File;->mkdirs()Z
- invoke-static {p1}, Lokio/Okio;->appendingSink(Ljava/io/File;)Lokio/Sink;
- move-result-object p1
- return-object p1
- .end method
- .method public delete(Ljava/io/File;)V
- .locals 3
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- invoke-virtual {p1}, Ljava/io/File;->delete()Z
- move-result v0
- if-nez v0, :cond_1
- invoke-virtual {p1}, Ljava/io/File;->exists()Z
- move-result v0
- if-nez v0, :cond_0
- goto :goto_0
- :cond_0
- new-instance v0, Ljava/io/IOException;
- new-instance v1, Ljava/lang/StringBuilder;
- invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
- const-string v2, "failed to delete "
- invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
- invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object p1
- invoke-direct {v0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
- throw v0
- :cond_1
- :goto_0
- return-void
- .end method
- .method public deleteContents(Ljava/io/File;)V
- .locals 4
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- invoke-virtual {p1}, Ljava/io/File;->listFiles()[Ljava/io/File;
- move-result-object v0
- if-eqz v0, :cond_3
- array-length p1, v0
- const/4 v1, 0x0
- :goto_0
- if-ge v1, p1, :cond_2
- aget-object v2, v0, v1
- invoke-virtual {v2}, Ljava/io/File;->isDirectory()Z
- move-result v3
- if-eqz v3, :cond_0
- invoke-virtual {p0, v2}, Lokhttp3/internal/io/FileSystem$1;->deleteContents(Ljava/io/File;)V
- :cond_0
- invoke-virtual {v2}, Ljava/io/File;->delete()Z
- move-result v3
- if-eqz v3, :cond_1
- add-int/lit8 v1, v1, 0x1
- goto :goto_0
- :cond_1
- new-instance p1, Ljava/io/IOException;
- new-instance v0, Ljava/lang/StringBuilder;
- invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
- const-string v1, "failed to delete "
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
- invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object v0
- invoke-direct {p1, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
- throw p1
- :cond_2
- return-void
- :cond_3
- new-instance v0, Ljava/io/IOException;
- new-instance v1, Ljava/lang/StringBuilder;
- invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
- const-string v2, "not a readable directory: "
- invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
- invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object p1
- invoke-direct {v0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
- goto :goto_2
- :goto_1
- throw v0
- :goto_2
- goto :goto_1
- .end method
- .method public exists(Ljava/io/File;)Z
- .locals 0
- invoke-virtual {p1}, Ljava/io/File;->exists()Z
- move-result p1
- return p1
- .end method
- .method public rename(Ljava/io/File;Ljava/io/File;)V
- .locals 3
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- invoke-virtual {p0, p2}, Lokhttp3/internal/io/FileSystem$1;->delete(Ljava/io/File;)V
- invoke-virtual {p1, p2}, Ljava/io/File;->renameTo(Ljava/io/File;)Z
- move-result v0
- if-eqz v0, :cond_0
- return-void
- :cond_0
- new-instance v0, Ljava/io/IOException;
- new-instance v1, Ljava/lang/StringBuilder;
- invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
- const-string v2, "failed to rename "
- invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
- const-string p1, " to "
- invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
- invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object p1
- invoke-direct {v0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
- throw v0
- .end method
- .method public sink(Ljava/io/File;)Lokio/Sink;
- .locals 1
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/FileNotFoundException;
- }
- .end annotation
- :try_start_0
- invoke-static {p1}, Lokio/Okio;->sink(Ljava/io/File;)Lokio/Sink;
- move-result-object p1
- :try_end_0
- .catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
- return-object p1
- :catch_0
- invoke-virtual {p1}, Ljava/io/File;->getParentFile()Ljava/io/File;
- move-result-object v0
- invoke-virtual {v0}, Ljava/io/File;->mkdirs()Z
- invoke-static {p1}, Lokio/Okio;->sink(Ljava/io/File;)Lokio/Sink;
- move-result-object p1
- return-object p1
- .end method
- .method public size(Ljava/io/File;)J
- .locals 2
- invoke-virtual {p1}, Ljava/io/File;->length()J
- move-result-wide v0
- return-wide v0
- .end method
- .method public source(Ljava/io/File;)Lokio/Source;
- .locals 0
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/FileNotFoundException;
- }
- .end annotation
- invoke-static {p1}, Lokio/Okio;->source(Ljava/io/File;)Lokio/Source;
- move-result-object p1
- return-object p1
- .end method
|