Size of the file ?

I wanted to know how can you get the size of the file when you have the filename and filepath with you ?
-Gada

If you use the class NSFileHandle, you can send the file -availableData message returning an NSData, from there, you can send it a -length message and that will return the size in bytes of the file.

Similar Messages

  • I am shooting with a Nikon D60 on Fine Format and unable to print larger than 11x14.  I have been able to print larger pictures.  I am told iPhoto reduces the size of the file when uploaded. Is this true? If so how can I change this?  I need 16x20's

    I am shooting with a Nikon D60 on Fine Format and unable to print larger than 11x14.  I have been able to print larger pictures.  I am told iPhoto reduces the size of the file when uploaded. Is this true? If so how can I change this?  I need 16x20's

    I am shooting with a Nikon D60 on Fine Format and unable to print larger than 11x14.  I have been able to print larger pictures.  I am told iPhoto reduces the size of the file when uploaded. Is this true? If so how can I change this?  I need 16x20's

  • How to get the size of the file

    Hi All,
    I want to get the size of the file in terms of bytes. I used the following code it returns the value in long how can get it in bytes
    import java.io.File;
    public class ServerBackupCheck {
         public static void main(String args[]){
              File f = new File("C:/Program Files/Apache Software Foundation/Tomcat 5.5");
              System.out.println(f.isDirectory());
              System.out.println(f.getTotalSpace());
    output:
    true
    20964163584
    regards,
    Maheshwaran Devaraj

    if it is a folder you can use this recursive algorithm
    public static long recurse(File f) throws IOException
              long bytes = 0;
              File files[] = f.listFiles();
              for(int i =0 ;i<files.length;i++)
                   File file = files ;
                   if(file.isFile())
                        FileInputStream fis = new FileInputStream(file);
                        byte[] by = new byte[fis.available()];
                        fis.read(by);
                        bytes = bytes + by.length;
                   if(file.isDirectory())
                        bytes = bytes + recurse(file);
              return bytes;
    System.out.println(recurse(f));  gives you the total bytes....
    Ayberk Cansever ..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Inform about the Size of the files stored in DMS as warning message

    hi DMS Gurus,
    We have a critical requirement of informing the users about the size of the file getting stored in SAP DMS, we need to inform the users the size of the file getting stored as this has a implication on flowing the documents in to remote Mobile device, and the concern is, any document above 2 MB would take much longer time or may not flow at all,
    so we need this information available in DIR, so the user can have a choice to choose the file before sending it to Mobile device,
    can i know if this file size is logged in SAP System anywhere?
    Any suggestion is welcome
    Thanks and regards,
    Kumar

    Hi Kumar,
    normally the file size could be found in table DMS_PHF_CD1. You should be able to get the correct entry by using the LOIO- or PHIO-ID which can be obtained by report DMS_KPRO_READ. Other useful tables are DMS_PH_CD1, DMS_PHIO2FILES and DMS_DOC2LOIO.
    Best regards,
    Christoph

  • Where to see the size of the file in XI system

    where to see the size of the file in XI system..i mean after sending it into XI....
    Edited by: Harsha reddy on Jun 25, 2008 5:51 PM

    Hi,
    You can UDF like in Message Mapping to get the file size.
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","SourceFileSize");
    fileSize = conf.get(key);
    You have to mention adapter specific attribute for file size in file adapter.
    How to retrieve file size and XI message ID?
    Kulwinder
    Reward if Helpful

  • I have a question about the new version of itunes. in the old version at the bottom of the sceen it display the total number of media and the size of the files. how can i get the new version to diplay this?

    in the old version at the bottom of the sceen it displayed the total number of media and the size of the files. how can i get the new version to diplay this?

    You're welcome. It was frustrating for me as well until I stumbled across "the fix"

  • Increasing size of the FILE VAULT - Is It Possible????

    Is there any way I can increase the size of the FILE VAULT from 56GB to 150GB or more? I have a 250GB H/D.
    This is where my photos are store in their aperture library and because this is now full, I can't d/l any more until I either clear/delete a lot of files.

    Though I'll agree with the advice about moving photos to an external drive, IMHO File Vault is essential, especially for laptop users. In my experience, people only regret not using encryption when their computer is stolen. Just ask yourself - is there anything on your computer that you might keep in a safe? Account numbers? Credit card numbers? Sensitive emails?
    It's not about government secrets, it's about wether or not you lock your door when you leave your house. If you don't, then File Vault is not for you.
    I've been using File Vault for three years without incident. Though I back up the entire Vault daily (into another encrypted image on an external drive), I have learned to trust it.

  • The size of the file depends how long the application must wait?

    hi all
    We have build an FLEX application where the user can create an object in SAP. One of the properties of this object is a file.
    We had noticed that when the size of the file increases, also the time increases of the processing duration of FLEX to send all data to SAP and to return a succesfull message.
    When i set a breakpoint in the ABAP code which is called via a web service by FLEX, it is reached very quickly.
    This is the last line of ABAP code and after this SAP has completed its work. So a successmessage returns to FLEX after it
    But the time, when FLEX returns this message to the user depends on the size of the file which was send to SAP.
    When we send a file of 2 MB it is significant slower then a file of 0,2 MB. And not slower in the traffic SAP - FLEX or the processing in ABAP, but the processing of FLEX after the service call to SAP.
    Does anybody have experienced this also? And if so, what can we do about it?
    Kind regards,
    Anton Pierhagen

    hmm. i dont think there is any knowledge here about this subject. So i am closing this thread.

  • Several encrypted .dmg files show much more free space that the total size of the file.

    I have several encrypted .dmg files on my macbook air running OS X 10.10.1  I have had them for years with no problems. Now suddenly, in the finder, at the bottom of the finder window where it shows the number of items and free space for a disk, it shows more free space than the full size of the .dmg file. Typically it will show about 200MB for a 100 MB file. Obviously, this is a bug, but I can find no information or discussions about it anywhere.
    Does anyone have the same problem? Any ideas how to fix it?

    Thanks for the ideas. Unfortunately, it didn't work.
    I rebuilt the spotlight index as suggested.
    I tried it twice, rebooting the computer a couple of time along the way.
    Below you can see the actual file as it occurs in the finder in its unopened form.
    Now, below here is what the finder reports at the bottom of the finder window when the file is opened and added as a virtual disk.
    Note that the total file size is 102.5 Mb
    Yet the finder says it has 234.5 Mb free!
    The actual size of the files on the disk add up to about 60 Mb
    This occurs with several similar dmg files.
    Any other ideas or experiences would be appreciated.

  • Would like to verify Time Machine backup but when I enter TM and then open iPhoto, it only provides me a gray window telling me the size of the file. How do I make sure all iPhoto pictures have been backed up on Time Machine?

    Would like to verify Time Machine backup but when I enter TM and then open iPhoto, it only provides me a gray window telling me the size of the file. How do I make sure all iPhoto pictures have been backed up on Time Machine?

    HaJo-aus-BS wrote:
    Since Snow-Leo time machine offers an option to verify backups, but I have found that it does not work for external disks attached by USB or FireWire.
    Yes, that's for network backups only. 
    What can I do to make sure that the backups are OK?
    You can tell if the File System (the various directories, catalogs etc.) is ok by repairing your backup drive, per #A5 in Time Machine - Troubleshooting.
    You can "spot check" whether the Time Machine "Star Wars" display seems correct.
    You can do a full system restore to another disk per #14 in Time Machine - Frequently Asked Questions, then start up from it and see if things are there and seem to work.
    You can keep "secondary" backups (always a good idea).  See #27 in the FAQ post for some suggestions.

  • Max.size of the files in Labview 7.0

    What is the maximum size of the files which we can write or read using labview read or write files VI in Labview 7.0

    Hello Raman,
    there are some links to this topic.
    http://digital.ni.com/public.nsf/allkb/07227F8B6D29283B86256CB1008329BC
    http://digital.ni.com/public.nsf/allkb/AC936C31D4846114862569DE0052A506?OpenDocument
    http://forums.ni.com/ni/board/message?board.id=170&message.id=122971&requireLogin=False
    http://forums.ni.com/ni/board/message?board.id=170&message.id=56180&requireLogin=False
    http://search.ni.com/nisearch/nisearchservlet?nistype=default&ddown=2&cluster=true&filter=%2Btaxonom...
    Regards
    ThomasD

  • Not getting an option of exporting in mpeg 4 format? AVI file the size of the file is extremely huge

    Hi,
    I am not getting an option of exporting in mpeg 4 format? Infact when I am rendering in AVI file the size of the file is extremely huge. Please can somebody help me in reducing the file size & exporting in MPEG4 format.

    You need to learn about encoding. The default file type is Lossless for a reason. If you are using Ray-tracing and you have a supported Cuda card you must use the Adobe Render Cue. If you are not using Ray-traced rendering then you should be using the Adobe Media Encoder.
    This will get you started: Basic Workflow, the last section is on rendering.

  • Why is Data Size in QT inspector twice the size of the file?

    I am not asking this to save space. I am just curious. When playing a dv (captured from camera) clip, I notice that the QT inspector shows data size about twice the size of the dv clip size in file system. Is it because the dv is compressed and QT decompresses?
    Actually, on clip in QT shows 22GB which is impossible to fit on a miniDV tape.

    You'll notice that a DV Stream file has two tracks (audio and video) of the same size when viewed in QuickTime Movie Inspector or the Movie Properties window of QuickTime Player Pro.
    Obviously the audio track shouldn't be the same size as the video track. There are separated from the single stream to allow editing.

  • Once combine file, it is too large to email. Is there a way to reduce the size of the file?

    Combined files and now it is too large to send. Is there a way to reduce the size of the converted file in Adobe?

    Hi yodonna,
    Adobe Reader doesn't allow you to reduce the size of a PDF file, as Acrobat does. But, you could upload that file to your Acrobat.com account, and create an anonymous link to it using Adobe Send. Then, you could send that link via email. You can access Adobe Send at https://cloud.acrobat.com/send. The Create an Anonymous Link feature doesn't require that you have an Adobe Send subscription.
    Best,
    Sara

  • When using crop tool based on canvas size dimensions, the file size becomes very large

    Can someone explain how to best figure out crop tool settings to maintain relative file size?  I tried to use the image / canvas size information to set the crop tools dimensions, but the file saved is 10 times larger than the original.
    Thanks!

    What exact version of Photoshop?  There were changes to the crop tool as of CS6, althoughy there's an option to use Classic (the old crop tool behaviour).
    It wouldn't hurt to specify your platform (Mac or Win)…
    If you give complete and detailed information about your setup and the issue at hand, such as your platform (Mac or Win), exact versions of your OS, of Photoshop and of Bridge, machine specs, what troubleshooting steps you have taken so far, what error message(s) you receive, if having issues opening raw files also the exact camera make and model that generated them, etc., someone may be able to help you better and faster.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

Maybe you are looking for