![JAR search and dependency download from the Maven repository](/logo.png)
com.google.common.io.Files.class Maven / Gradle / Ivy
???? 4
java/lang/Object ()V
$com/google/common/base/Preconditions checkNotNull &(Ljava/lang/Object;)Ljava/lang/Object; java/io/BufferedReader java/io/InputStreamReader java/io/FileInputStream
(Ljava/io/File;)V
2(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V
(Ljava/io/Reader;)V java/io/BufferedWriter java/io/OutputStreamWriter ! java/io/FileOutputStream
$ % 3(Ljava/io/OutputStream;Ljava/nio/charset/Charset;)V
' ( (Ljava/io/Writer;)V * )com/google/common/io/Files$FileByteSource
) , - /(Ljava/io/File;Lcom/google/common/io/Files$1;)V / 'com/google/common/io/Files$FileByteSink
. 1 2 T(Ljava/io/File;[Lcom/google/common/io/FileWriteMode;Lcom/google/common/io/Files$1;)V
4 5 6 7 8 com/google/common/io/Files asByteSource 1(Ljava/io/File;)Lcom/google/common/io/ByteSource;
: ; < = > com/google/common/io/ByteSource asCharSource =(Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSource;
4 @ A B
asByteSink T(Ljava/io/File;[Lcom/google/common/io/FileWriteMode;)Lcom/google/common/io/ByteSink;
D E F G H com/google/common/io/ByteSink
asCharSink ;(Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSink;
: J K L read ()[B
4 N = O K(Ljava/io/File;Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSource;
Q R S K T com/google/common/io/CharSource ()Ljava/lang/String; V "com/google/common/io/FileWriteMode
D X Y Z write ([B)V
4 \ G ] n(Ljava/io/File;Ljava/nio/charset/Charset;[Lcom/google/common/io/FileWriteMode;)Lcom/google/common/io/CharSink;
_ ` a Y b com/google/common/io/CharSink (Ljava/lang/CharSequence;)V
: d e f copyTo (Ljava/io/OutputStream;)J
h i j k l java/io/File equals (Ljava/lang/Object;)Z n .Source %s and destination %s must be different
p q r
checkArgument :(ZLjava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
: t e u "(Lcom/google/common/io/ByteSink;)J
Q w e x (Ljava/lang/Appendable;)J U z { | APPEND $Lcom/google/common/io/FileWriteMode;
h ~ ? length ()J
: ? ? ?
contentEquals $(Lcom/google/common/io/ByteSource;)Z ? ? ? ? ? $com/google/common/io/TempFileCreator INSTANCE &Lcom/google/common/io/TempFileCreator;
? ? ? ?
createTempDir ()Ljava/io/File;
h ? ? ?
createNewFile ()Z
? ? ? ? ? java/lang/System currentTimeMillis
h ? ? ? setLastModified (J)Z ? java/io/IOException ? java/lang/StringBuilder
? ? &Unable to update modification time of
? ? ? ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder;
? ? ? ? -(Ljava/lang/Object;)Ljava/lang/StringBuilder;
? ? ? T toString
? ? ? (Ljava/lang/String;)V
h ? ? ? getCanonicalFile
h ? ? ?
getParentFile
h ? ? ? mkdirs
h ? ? ? isDirectory ? 'Unable to create parent directories of
h ? ? ? renameTo (Ljava/io/File;)Z
4 ? ? ? copy (Ljava/io/File;Ljava/io/File;)V
h ? ? ? delete ? Unable to delete
Q ? ? T
readFirstLine ? com/google/common/io/Files$1
?
Q ? ? ? readLines 8(Lcom/google/common/io/LineProcessor;)Ljava/lang/Object; ? java/util/List
: ? K ? 8(Lcom/google/common/io/ByteProcessor;)Ljava/lang/Object;
: ? ? ? hash H(Lcom/google/common/hash/HashFunction;)Lcom/google/common/hash/HashCode; ? ? ? ? ? %java/nio/channels/FileChannel$MapMode READ_ONLY 'Ljava/nio/channels/FileChannel$MapMode;
4 ? ? ? map R(Ljava/io/File;Ljava/nio/channels/FileChannel$MapMode;)Ljava/nio/MappedByteBuffer;????????
4 ? ? ? mapInternal S(Ljava/io/File;Ljava/nio/channels/FileChannel$MapMode;J)Ljava/nio/MappedByteBuffer; ? size (%s) may not be negative
? q ? (ZLjava/lang/String;J)V
? ? ? ? ? com/google/common/io/Closer create ()Lcom/google/common/io/Closer; ? java/io/RandomAccessFile ? r ? rw
? #(Ljava/io/File;Ljava/lang/String;)V
? register ((Ljava/io/Closeable;)Ljava/io/Closeable;
?
getChannel !()Ljava/nio/channels/FileChannel; java/nio/channels/FileChannel
? size
? F(Ljava/nio/channels/FileChannel$MapMode;JJ)Ljava/nio/MappedByteBuffer;
? close java/lang/Throwable
? rethrow 3(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
java/lang/String ()I! .
#$%&' com/google/common/base/Splitter on $(C)Lcom/google/common/base/Splitter;
#)*+ omitEmptyStrings #()Lcom/google/common/base/Splitter;
#-./ split .(Ljava/lang/CharSequence;)Ljava/lang/Iterable;1 java/util/ArrayList
0 45678 java/lang/Iterable iterator ()Ljava/util/Iterator;:;<= ? java/util/Iterator hasNext:?@A next ()Ljava/lang/Object;
CD hashCode
iG .. ?I ?KLM get (I)Ljava/lang/Object; ?OPM remove ?RS l add
UVW&X com/google/common/base/Joiner "(C)Lcom/google/common/base/Joiner;
UZ[\ join ((Ljava/lang/Iterable;)Ljava/lang/String;
^_` charAt (I)Cb /d /../
fgh
startsWith (Ljava/lang/String;)Z
jkl substring (I)Ljava/lang/String;n /..p
h ?
hst T getName
vwx lastIndexOf (I)I
zk{ (II)Ljava/lang/String; 4}~ FILE_TREE ,Lcom/google/common/graph/SuccessorsFunction;
????? !com/google/common/graph/Traverser forTree Q(Lcom/google/common/graph/SuccessorsFunction;)Lcom/google/common/graph/Traverser; ????? (com/google/common/io/Files$FilePredicate IS_DIRECTORY *Lcom/google/common/io/Files$FilePredicate; ???? IS_FILE? com/google/common/io/Files$2
? Signature ; Code LineNumberTable LocalVariableTable this Lcom/google/common/io/Files; newReader B(Ljava/io/File;Ljava/nio/charset/Charset;)Ljava/io/BufferedReader; file Ljava/io/File; charset Ljava/nio/charset/Charset;
Exceptions? java/io/FileNotFoundException MethodParameters newWriter B(Ljava/io/File;Ljava/nio/charset/Charset;)Ljava/io/BufferedWriter; modes %[Lcom/google/common/io/FileWriteMode; toByteArray (Ljava/io/File;)[B <(Ljava/io/File;Ljava/nio/charset/Charset;)Ljava/lang/String;
Deprecated RuntimeVisibleAnnotations Ljava/lang/Deprecated; RuntimeInvisibleAnnotations ,Lcom/google/errorprone/annotations/InlineMe; replacement (Files.asCharSource(file, charset).read() imports com.google.common.io.Files ([BLjava/io/File;)V from [B to C(Ljava/lang/CharSequence;Ljava/io/File;Ljava/nio/charset/Charset;)V Ljava/lang/CharSequence; )Files.asCharSink(to, charset).write(from) '(Ljava/io/File;Ljava/io/OutputStream;)V Ljava/io/OutputStream;
StackMapTable A(Ljava/io/File;Ljava/nio/charset/Charset;Ljava/lang/Appendable;)V Ljava/lang/Appendable; ,Files.asCharSource(from, charset).copyTo(to) ?Files.asCharSink(to, charset, FileWriteMode.APPEND).write(from) "com.google.common.io.FileWriteMode equal (Ljava/io/File;Ljava/io/File;)Z file1 file2 len1 J len2 $Lcom/google/common/annotations/Beta; touch createParentDirs parent move Ljavax/annotation/CheckForNull; 1Files.asCharSource(file, charset).readFirstLine() :(Ljava/io/File;Ljava/nio/charset/Charset;)Ljava/util/List; N(Ljava/io/File;Ljava/nio/charset/Charset;)Ljava/util/List; `(Ljava/io/File;Ljava/nio/charset/Charset;Lcom/google/common/io/LineProcessor;)Ljava/lang/Object; callback $Lcom/google/common/io/LineProcessor; LocalVariableTypeTable )Lcom/google/common/io/LineProcessor; l(Ljava/io/File;Ljava/nio/charset/Charset;Lcom/google/common/io/LineProcessor;)TT; )Lcom/google/common/io/ParametricNullness; 5Files.asCharSource(file, charset).readLines(callback) 8Lcom/google/errorprone/annotations/CanIgnoreReturnValue; RuntimeVisibleTypeAnnotations 5Lorg/checkerframework/checker/nullness/qual/Nullable; readBytes F(Ljava/io/File;Lcom/google/common/io/ByteProcessor;)Ljava/lang/Object; processor $Lcom/google/common/io/ByteProcessor; )Lcom/google/common/io/ByteProcessor; R(Ljava/io/File;Lcom/google/common/io/ByteProcessor;)TT; (Files.asByteSource(file).read(processor) V(Ljava/io/File;Lcom/google/common/hash/HashFunction;)Lcom/google/common/hash/HashCode; hashFunction %Lcom/google/common/hash/HashFunction; +Files.asByteSource(file).hash(hashFunction) +(Ljava/io/File;)Ljava/nio/MappedByteBuffer; mode raf Ljava/io/RandomAccessFile; channel Ljava/nio/channels/FileChannel; e Ljava/lang/Throwable; closer Lcom/google/common/io/Closer; simplifyPath &(Ljava/lang/String;)Ljava/lang/String; component Ljava/lang/String; pathname
components Ljava/lang/Iterable; path Ljava/util/List; result (Ljava/lang/Iterable; $Ljava/util/List; getFileExtension fullName fileName dotIndex I getNameWithoutExtension
fileTraverser %()Lcom/google/common/graph/Traverser; 5()Lcom/google/common/graph/Traverser; $()Lcom/google/common/base/Predicate; 4()Lcom/google/common/base/Predicate; isFile
SourceFile
Files.java 6Lcom/google/common/io/ElementTypesAreNonnullByDefault; 0Lcom/google/common/annotations/J2ktIncompatible; /Lcom/google/common/annotations/GwtIncompatible; InnerClasses FileByteSource FileByteSink MapMode
FilePredicate 1 4 ~ ? ? $ ? / *? ? ? L? ?? ?? ? ^ "*? W+? W?
Y? Y? Y*? +? ? ? ? Z [
\? "?? "?? ? ?? ? ? ?? ? ^ "*? W+? W? Y? Y? Y*? "+? #? &? ? l m
n? "?? "?? ? ?? ? ? 7 8 ? 4
? )Y*? +? ? w?
?? ? ? ? A B ? ? ? .Y*+? 0? ? ?? ?? ?? ? ? ? = O ? = *? 3+? 9? ? ?? ?? ?? ? ? ? ? G ] ? H
*,? ?+? C? ? ??
??
??
?? ?
? ? ? ?? ? 2 *? 3? I? ? ?? ?? ? ?? ? ?? ? = *+? M? P? ? ? ?? ?? ? ?? ? ? ? ? ? ? ? ?s??[ s? Y? ? E
+? U? ?*? W? ?
?
??
?? ? ?? ? ? Y? ? P +,? U? [*? ^? ?
"
#? ?? ?? ?? ? ??
? ? ? ? ? ? ? ? ?s??[ s? ?? ? B
*? 3+? cX? ?
0 1?
??
?? ? ?? ? ? ? ? ? l %*+? g? ? m*+? o*? 3+? U? ?? sX? ? G H $I? %?? %?? ? @? ?? ? ? ?? ? M *+? M,? vX? ?
[
\? ?? ?? ?? ? ??
? ? ? ? ? ? ? ? ?s??[ s? ?? ? V +,? UY? yS? [*? ^? ?
o p? ?? ?? ?? ? ??
? ? ? ? ? ? ? ? ?s??[ s?s? ?? ? ? F*? W+? W*+? *+? g? ?*? }A+? }7 ?? ?? ?? ?*? 3+? 3? ?? ? &