Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
import java.io.*; public class Main { static long max_length = 0; static File max_file = null; static void rec(File at) { File[] files = at.listFiles(); for(int i = 0; i < files.length; i++) { if(files[i].isDirectory()) { rec(files[i]); } else { if(max_length < files[i].length()) { max_length = files[i].length(); max_file = files[i]; } } } } public static void main(String[] args) { String filePath = "/Users/josiftepegjozov/Documents/test"; File S = new File(filePath); rec(S); System.out.println(max_file.toString()); } } // rec(folder: test) // rec(folder: test2) // rec(folder: test3) //
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)