Manager - File Information

java.lang.System.setOut(new java.io.PrintStream(new java.io.OutputStream() {

java.io.ByteArrayOutputStream outputStream = new java.io.ByteArrayOutputStream();
@Override
public void write(int oneByte) throws java.io.IOException {
   outputStream.write(oneByte);
   textview1.setText(new String(outputStream.toByteArray()));
}
}));
FilePaths a = new FilePaths();
a.file("/storage/emulated/0/Gabriel.txt");
}
public  static class FilePaths {
public static void file(String _src) {
displayInfo(_src);
}
public static void displayInfo(String f) {
try {
   java.io.File file = new java.io.File(f);
       System.out.println("========================================");
   System.out.println("          name:" + file.getName());
   System.out.println("  is directory:" + file.isDirectory());
   System.out.println("        exists:" + file.exists());
   System.out.println("          path:" + file.getPath());
   System.out.println(" absolute file:" + file.getAbsoluteFile());
   System.out.println(" absolute path:" + file.getAbsolutePath());
   System.out.println("canonical file:" + file.getCanonicalFile());
   System.out.println("canonical path:" + file.getCanonicalPath());
} catch (Exception e ) {
}
}
}
public void nothing() {

Komentar

Cara pembuatan Apps paling Populer

Create Stopwatch App in Android using Sketchware

How to enable download in webview in Sketchware apps?

TextInputLayout in Sketchware

Create Stopwatch App in Android using Sketchware

A Flash Light App in Sketchware

How to integrate Admob Ads in Sketchware project using AIDE?

How to find and​ highlight a word in a text field in Sketchware?

Firebase Login/Register with email verification

Codes for modifying Action Bar in Sketchware

Code for implementing Notifications in Sketchware