Class FileInfo
- java.lang.Object
-
- de.dytanic.cloudnet.driver.template.FileInfo
-
- All Implemented Interfaces:
SerializableObject
public class FileInfo extends java.lang.Object implements SerializableObject
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetCreationTime()longgetLastAccess()longgetLastModified()@NotNull java.lang.StringgetName()@NotNull java.lang.StringgetPath()longgetSize()booleanisDirectory()booleanisHidden()static @NotNull FileInfoof(@NotNull java.io.File file)static @NotNull FileInfoof(@NotNull java.nio.file.Path path)static @NotNull FileInfoof(@NotNull java.nio.file.Path fullPath, @NotNull java.nio.file.attribute.BasicFileAttributes attributes)static @NotNull FileInfoof(@NotNull java.nio.file.Path path, @Nullable java.nio.file.Path relativePath)static @NotNull FileInfoof(@NotNull java.nio.file.Path fullPath, @Nullable java.nio.file.Path relativePath, @NotNull java.nio.file.attribute.BasicFileAttributes attributes)voidread(@NotNull ProtocolBuffer buffer)voidwrite(@NotNull ProtocolBuffer buffer)
-
-
-
Method Detail
-
of
@NotNull public static @NotNull FileInfo of(@NotNull @NotNull java.nio.file.Path path) throws java.io.IOException
- Throws:
java.io.IOException
-
of
@NotNull public static @NotNull FileInfo of(@NotNull @NotNull java.nio.file.Path fullPath, @NotNull @NotNull java.nio.file.attribute.BasicFileAttributes attributes) throws java.io.IOException
- Throws:
java.io.IOException
-
of
@NotNull public static @NotNull FileInfo of(@NotNull @NotNull java.nio.file.Path path, @Nullable @Nullable java.nio.file.Path relativePath) throws java.io.IOException
- Throws:
java.io.IOException
-
of
@NotNull public static @NotNull FileInfo of(@NotNull @NotNull java.nio.file.Path fullPath, @Nullable @Nullable java.nio.file.Path relativePath, @NotNull @NotNull java.nio.file.attribute.BasicFileAttributes attributes) throws java.io.IOException
- Throws:
java.io.IOException
-
of
@NotNull public static @NotNull FileInfo of(@NotNull @NotNull java.io.File file) throws java.io.IOException
- Throws:
java.io.IOException
-
getPath
@NotNull public @NotNull java.lang.String getPath()
-
getName
@NotNull public @NotNull java.lang.String getName()
-
isDirectory
public boolean isDirectory()
-
isHidden
public boolean isHidden()
-
getCreationTime
public long getCreationTime()
-
getLastModified
public long getLastModified()
-
getLastAccess
public long getLastAccess()
-
getSize
public long getSize()
-
write
public void write(@NotNull @NotNull ProtocolBuffer buffer)- Specified by:
writein interfaceSerializableObject
-
read
public void read(@NotNull @NotNull ProtocolBuffer buffer)- Specified by:
readin interfaceSerializableObject
-
-