How to long into string array
Hi All,
is there any possibility to convert long into string array using the followuing code:
File sampleFiles =new File("C:/Example/convert");
long folder=sampleFiles.length();
String[] folderList= ?
Hi All,
is there any possibility to convert long into string array using the followuing code:
File sampleFiles =new File("C:/Example/convert");
long folder=sampleFiles.length();
String[] folderList= ?
Voodoo?
What are you really trying to achieve? This is a guess at a solution to something, what is that something?
> Hi,
> I want to convert this length of the files in
> that path into a string array.
Suppose the length was 17. What would the String array be?
Hi,
It Must come in bytes for example,
size ofc:/Example/convert/Example.txt =2420 bytes;
c:/Example/convert/Example1.txt =2423 bytes;
when i give sampleFiles.length it displays as
sampleFile[0].length=2420 bytes;
sampleFile[1].length=2423 bytes;
can we put this sampleFile.length in String[] folderSize.
So sampleFiles is a *directory* and you want information about the files in that directory? Again, read the File API. You'll find out some interesting things like sampleFiles.length() is not what you think it is.
http://java.sun.com/javase/6/docs/api/
Do you want the size of the file or the lenght of characters in the file? Be a little clear on this.