public class org.apache.tomcat.util.http.fileupload.FileUtils
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.tomcat.util.http.fileupload.FileUtils
super_class: java.lang.Object
{
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/tomcat/util/http/fileupload/FileUtils;
public static void deleteDirectory(java.io.File);
descriptor: (Ljava/io/File;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual java.io.File.exists:()Z
ifne 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
invokestatic org.apache.tomcat.util.http.fileupload.FileUtils.isSymlink:(Ljava/io/File;)Z
ifne 4
3: aload 0
invokestatic org.apache.tomcat.util.http.fileupload.FileUtils.cleanDirectory:(Ljava/io/File;)V
4: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.io.File.delete:()Z
ifne 8
5: new java.lang.StringBuilder
dup
ldc "Unable to delete directory "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc "."
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
6: astore 1
start local 1 7: new java.io.IOException
dup
aload 1
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
end local 1 8: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 directory Ljava/io/File;
7 8 1 message Ljava/lang/String;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
directory final
public static void cleanDirectory(java.io.File);
descriptor: (Ljava/io/File;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=8, args_size=1
start local 0 0: aload 0
invokevirtual java.io.File.exists:()Z
ifne 3
1: new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc " does not exist"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 1
start local 1 2: new java.lang.IllegalArgumentException
dup
aload 1
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
end local 1 3: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.io.File.isDirectory:()Z
ifne 6
4: new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc " is not a directory"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 1
start local 1 5: new java.lang.IllegalArgumentException
dup
aload 1
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
end local 1 6: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.io.File.listFiles:()[Ljava/io/File;
astore 1
start local 1 7: aload 1
ifnonnull 9
8: new java.io.IOException
dup
new java.lang.StringBuilder
dup
ldc "Failed to list contents of "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
9: StackMap locals: java.io.File[]
StackMap stack:
aconst_null
astore 2
start local 2 10: aload 1
dup
astore 6
arraylength
istore 5
iconst_0
istore 4
goto 17
StackMap locals: java.io.File java.io.File[] java.io.IOException top int int java.io.File[]
StackMap stack:
11: aload 6
iload 4
aaload
astore 3
start local 3 12: aload 3
invokestatic org.apache.tomcat.util.http.fileupload.FileUtils.forceDelete:(Ljava/io/File;)V
13: goto 16
StackMap locals: java.io.File java.io.File[] java.io.IOException java.io.File int int java.io.File[]
StackMap stack: java.io.IOException
14: astore 7
start local 7 15: aload 7
astore 2
end local 7 end local 3 16: StackMap locals: java.io.File java.io.File[] java.io.IOException top int int java.io.File[]
StackMap stack:
iinc 4 1
StackMap locals:
StackMap stack:
17: iload 4
iload 5
if_icmplt 11
18: aload 2
ifnull 20
19: aload 2
athrow
20: StackMap locals: java.io.File java.io.File[] java.io.IOException
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 21 0 directory Ljava/io/File;
2 3 1 message Ljava/lang/String;
5 6 1 message Ljava/lang/String;
7 21 1 files [Ljava/io/File;
10 21 2 exception Ljava/io/IOException;
12 16 3 file Ljava/io/File;
15 16 7 ioe Ljava/io/IOException;
Exception table:
from to target type
12 13 14 Class java.io.IOException
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
directory final
public static void forceDelete(java.io.File);
descriptor: (Ljava/io/File;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=3, args_size=1
start local 0 0: aload 0
invokevirtual java.io.File.isDirectory:()Z
ifeq 3
1: aload 0
invokestatic org.apache.tomcat.util.http.fileupload.FileUtils.deleteDirectory:(Ljava/io/File;)V
2: goto 10
3: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.io.File.exists:()Z
istore 1
start local 1 4: aload 0
invokevirtual java.io.File.delete:()Z
ifne 10
5: iload 1
ifne 7
6: new java.io.FileNotFoundException
dup
new java.lang.StringBuilder
dup
ldc "File does not exist: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.io.FileNotFoundException.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals: int
StackMap stack:
new java.lang.StringBuilder
dup
ldc "Unable to delete file: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
8: astore 2
start local 2 9: new java.io.IOException
dup
aload 2
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
end local 2 end local 1 10: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 file Ljava/io/File;
4 10 1 filePresent Z
9 10 2 message Ljava/lang/String;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
file final
public static void forceDeleteOnExit(java.io.File);
descriptor: (Ljava/io/File;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual java.io.File.isDirectory:()Z
ifeq 3
1: aload 0
invokestatic org.apache.tomcat.util.http.fileupload.FileUtils.deleteDirectoryOnExit:(Ljava/io/File;)V
2: goto 4
3: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.io.File.deleteOnExit:()V
4: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 file Ljava/io/File;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
file final
private static void deleteDirectoryOnExit(java.io.File);
descriptor: (Ljava/io/File;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual java.io.File.exists:()Z
ifne 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.io.File.deleteOnExit:()V
3: aload 0
invokestatic org.apache.tomcat.util.http.fileupload.FileUtils.isSymlink:(Ljava/io/File;)Z
ifne 5
4: aload 0
invokestatic org.apache.tomcat.util.http.fileupload.FileUtils.cleanDirectoryOnExit:(Ljava/io/File;)V
5: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 directory Ljava/io/File;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
directory final
private static void cleanDirectoryOnExit(java.io.File);
descriptor: (Ljava/io/File;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=8, args_size=1
start local 0 0: aload 0
invokevirtual java.io.File.exists:()Z
ifne 3
1: new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc " does not exist"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 1
start local 1 2: new java.lang.IllegalArgumentException
dup
aload 1
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
end local 1 3: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.io.File.isDirectory:()Z
ifne 6
4: new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc " is not a directory"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 1
start local 1 5: new java.lang.IllegalArgumentException
dup
aload 1
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
end local 1 6: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.io.File.listFiles:()[Ljava/io/File;
astore 1
start local 1 7: aload 1
ifnonnull 9
8: new java.io.IOException
dup
new java.lang.StringBuilder
dup
ldc "Failed to list contents of "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
9: StackMap locals: java.io.File[]
StackMap stack:
aconst_null
astore 2
start local 2 10: aload 1
dup
astore 6
arraylength
istore 5
iconst_0
istore 4
goto 17
StackMap locals: java.io.File java.io.File[] java.io.IOException top int int java.io.File[]
StackMap stack:
11: aload 6
iload 4
aaload
astore 3
start local 3 12: aload 3
invokestatic org.apache.tomcat.util.http.fileupload.FileUtils.forceDeleteOnExit:(Ljava/io/File;)V
13: goto 16
StackMap locals: java.io.File java.io.File[] java.io.IOException java.io.File int int java.io.File[]
StackMap stack: java.io.IOException
14: astore 7
start local 7 15: aload 7
astore 2
end local 7 end local 3 16: StackMap locals: java.io.File java.io.File[] java.io.IOException top int int java.io.File[]
StackMap stack:
iinc 4 1
StackMap locals:
StackMap stack:
17: iload 4
iload 5
if_icmplt 11
18: aload 2
ifnull 20
19: aload 2
athrow
20: StackMap locals: java.io.File java.io.File[] java.io.IOException
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 21 0 directory Ljava/io/File;
2 3 1 message Ljava/lang/String;
5 6 1 message Ljava/lang/String;
7 21 1 files [Ljava/io/File;
10 21 2 exception Ljava/io/IOException;
12 16 3 file Ljava/io/File;
15 16 7 ioe Ljava/io/IOException;
Exception table:
from to target type
12 13 14 Class java.io.IOException
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
directory final
public static void forceMkdir(java.io.File);
descriptor: (Ljava/io/File;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual java.io.File.exists:()Z
ifeq 9
1: aload 0
invokevirtual java.io.File.isDirectory:()Z
ifne 14
2: new java.lang.StringBuilder
dup
ldc "File "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
3: aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
4: ldc " exists and is "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
5: ldc "not a directory. Unable to create directory."
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
6: invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
7: astore 1
start local 1 8: new java.io.IOException
dup
aload 1
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
end local 1 9: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.io.File.mkdirs:()Z
ifne 14
10: aload 0
invokevirtual java.io.File.isDirectory:()Z
ifne 14
11: new java.lang.StringBuilder
dup
ldc "Unable to create directory "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
12: astore 1
start local 1 13: new java.io.IOException
dup
aload 1
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
end local 1 14: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 directory Ljava/io/File;
8 9 1 message Ljava/lang/String;
13 14 1 message Ljava/lang/String;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
directory final
public static void forceMkdirParent(java.io.File);
descriptor: (Ljava/io/File;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual java.io.File.getParentFile:()Ljava/io/File;
astore 1
start local 1 1: aload 1
ifnonnull 3
2: return
3: StackMap locals: java.io.File
StackMap stack:
aload 1
invokestatic org.apache.tomcat.util.http.fileupload.FileUtils.forceMkdir:(Ljava/io/File;)V
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 file Ljava/io/File;
1 5 1 parent Ljava/io/File;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
file final
public static boolean isSymlink(java.io.File);
descriptor: (Ljava/io/File;)Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=3, args_size=1
start local 0 0: aload 0
ifnonnull 2
1: new java.lang.NullPointerException
dup
ldc "File must not be null"
invokespecial java.lang.NullPointerException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
getstatic java.io.File.separatorChar:C
bipush 92
if_icmpne 4
3: iconst_0
ireturn
4: StackMap locals:
StackMap stack:
aconst_null
astore 1
start local 1 5: aload 0
invokevirtual java.io.File.getParent:()Ljava/lang/String;
ifnonnull 8
6: aload 0
astore 1
7: goto 10
8: StackMap locals: java.io.File
StackMap stack:
aload 0
invokevirtual java.io.File.getParentFile:()Ljava/io/File;
invokevirtual java.io.File.getCanonicalFile:()Ljava/io/File;
astore 2
start local 2 9: new java.io.File
dup
aload 2
aload 0
invokevirtual java.io.File.getName:()Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 1
end local 2 10: StackMap locals:
StackMap stack:
aload 1
invokevirtual java.io.File.getCanonicalFile:()Ljava/io/File;
aload 1
invokevirtual java.io.File.getAbsoluteFile:()Ljava/io/File;
invokevirtual java.io.File.equals:(Ljava/lang/Object;)Z
ifeq 12
11: iconst_0
ireturn
12: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 file Ljava/io/File;
5 13 1 fileInCanonicalDir Ljava/io/File;
9 10 2 canonicalDir Ljava/io/File;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
file
}
SourceFile: "FileUtils.java"