In Mac how to get the Full name of a file Programmatically?

Hi Friends,
         I am doing one Mac application for displaying the contents of a file. I can able to get some information about the file by using this code below...
  NSDictionary *dict=[fileManager attributesOfItemAtPath:myPath error:nil];
Now I want to get the some other informations also like Full Name, copyRight, version... So Please suggest me how to get the full name of a file Programmaticallly?

Your question doesn't make sense.
First off, if you are going to get the attributes of a file, you need its full name before you can do anything. So that's part one taken care of.
This function returns a dictionary full of typical file information (type, size, mod dates, etc.) as well as some HFS data (creator code, type code) which, I strongly suspect, are not "pulled out of the file" but rather generated on the spot. (See NSFileManager for the full list of attribute keys.)
The other items you hoped of retrieving are not part of the regular file system. Sure, a Truetype font has a copyright string and a version, but what about an HTML file? A PNG? A text file you just created?
There simply are no standard functions to retrieve copyright and version.

Similar Messages

  • How to get the Full Name from NT realm

    I need to get the full name of the logged user not just the username. I get
    the username defined in NT by request.getRemoteUser(). I need to get the
    full name defined in NT server.
    Thanks
    madhu

    Hi Madhu,
    There are no apis to do this with WebLogic.
    What I recommend is to do some JNI with Java
    Create some custom class which retrieves the nt username and then makes calls to
    microsoft libraries to return the full name.
    I have no idea what these calls to microsoft libraries will actually be --
    you'll probably have to do some research to see how to retrieve full usernames
    from NT -- what libraries you need to use, etc.
    Good luck.
    Joe Jerry
    m holur wrote:
    I need to get the full name of the logged user not just the username. I get
    the username defined in NT by request.getRemoteUser(). I need to get the
    full name defined in NT server.
    Thanks
    madhu

  • How to get the full name of the Account Owner?

    Hi,
    I would like to ask if there's a way to display the full name of the Account Owner in a report where the subject area is Opportunity? Currently, the Username (under Owned By User) which displays the full name is equal to the Opportunity Owner.
    Thanks,
    Teena

    Hi Cameron,
    Thanks again.
    Currently, I have a report under Opportunity history where the following fields are being shown:
    - Account's Country
    - Opportunity Owner (Owned By User - gives me the full name)
    - Account Name
    - Opportunity Name
    - Metrics field (Revenue, Volume. etc.)
    - Close Date
    - some custom fields
    The users want to see the Account Owner so I added this field but it's showing the owner's alias. My question is, in using the "Combine with Similar Analysis", can I display all the values retrieved by the Opportunity report and get the value of 'Owned By User' in the Account report?
    I have tried combining the two reports but the values are derived from the driving report which is Opportunity. How can I get the value/format of the field in the Account report?
    Teena

  • How to get the full path of a file

        If the user selects a file through a browse button, Is there a way, I can get the full path of the file. The file can be from his local hard drive as well.. Can someone advise    

    To upload multiple files (example is for 3), try something like this.
    == Form section ==
    There would be three(3) file form fields for the selection of a file/document to upload, which
    each being uniquely named.
    <div style="clear: both;">
    <cfinput type="file" name="upload_01" dir="ltr" lang="en" size="70" xml:lang="en">
    </div>
    <div style="clear: both;">
    <cfinput type="file" name="upload_02" dir="ltr" lang="en" size="70" xml:lang="en">
    </div>
    <div style="clear: both;">
    <cfinput type="file" name="upload_03" dir="ltr" lang="en" size="70" xml:lang="en">
    </div>
    == Processing section ==
    Checks to see if any files / documents were selected for upload. If none were, then
    displays an alert indicating as such. If at least one file/document was selected, then
    the process would process the upload.
    <cfif isdefined('form.upload_01') and trim(form.upload_01) eq "" and
    isdefined('form.upload_02') and trim(form.upload_02) eq "" and
    isdefined('form.upload_03') and trim(form.upload_03) eq ""
    >
        <p>Did not select any files to upload</p>
    <cfelse>
        <cfif isdefined('form.upload_01') and trim(form.upload_01) neq "">
            <cffile
                action="upload"
                destination="C:\path\to\upload\files\to"
                filefield="upload_01"
                nameconflict="overwrite"
                accept="
                  application/msword
                , application/vnd.openxmlformats-officedocument.wordprocessingml.document
                , application/vnd.ms-excel
                , application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
                , application/pdf">
                <cfcookie name="upload_01_doc" value="#cffile.serverfile#">
                <cfcookie name="upload_01_doc_ext" value="#cffile.serverfileext#">
        </cfif>
        <cfif isdefined('form.upload_02') and trim(form.upload_02) neq "">
            <cffile
                action="upload"
                destination="C:\path\to\upload\files\to"
                filefield="upload_02"
                nameconflict="overwrite"
                accept="
                  application/msword
                , application/vnd.openxmlformats-officedocument.wordprocessingml.document
                , application/vnd.ms-excel
                , application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
                , application/pdf">
                <cfcookie name="upload_02_doc" value="#cffile.serverfile#">
                <cfcookie name="upload_02_doc_ext" value="#cffile.serverfileext#">
        </cfif>
        <cfif isdefined('form.upload_03') and trim(form.upload_03) neq "">
        <cffile
            action="upload"
            destination="C:\path\to\upload\files\to"
            filefield="upload_03"
            nameconflict="overwrite"
            accept="
                  application/msword
                , application/vnd.openxmlformats-officedocument.wordprocessingml.document
                , application/vnd.ms-excel
                , application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
                , application/pdf">
            <cfcookie name="upload_03_doc" value="#cffile.serverfile#">
            <cfcookie name="upload_03_doc_ext" value="#cffile.serverfileext#">
        </cfif>
        <cflocation url="completed.cfm" addtoken="no">
    </cfif>
    == Completed section ==
    Can confirm to the person what files were actually uploaded, by displaying file name and file extension.
    You can you use the file extension information to display a respective icon for the file type.
    <cfoutput>
    <cfif isdefined('cookie.upload_01_doc')>
    01. #cookie.upload_01_doc# - #cookie.upload_01_doc_ext#<br /></cfif>
    <cfif isdefined('cookie.upload_02_doc')>
    02. #cookie.upload_02_doc# - #cookie.upload_02_doc_ext#<br /></cfif>
    <cfif isdefined('cookie.upload_03_doc')>
    03. #cookie.upload_03_doc# - #cookie.upload_03_doc_ext#<br /></cfif>
    </cfoutput>
    Leonard B

  • How to get the profile name

    I did not know how to get the profile name in photoshop file using javascript? Kindly help me.

    var myDocProfile = app.activeDocument.colorProfileName;

  • How to get the full path instead of just the file name, in �FileChooser� ?

    In the FileChooserDemo example :
    In the statement : log.append("Saving: " + file.getName() + "." + newline);
    �file.getName()� returns the �file name�.
    My question is : How to get the full path instead of just the file name,
    e.g. C:/xdirectory/ydirectory/abc.gif instead of just abc.gif
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.filechooser.*;
    public class FileChooserDemo extends JFrame {
    static private final String newline = "\n";
    public FileChooserDemo() {
    super("FileChooserDemo");
    //Create the log first, because the action listeners
    //need to refer to it.
    final JTextArea log = new JTextArea(5,20);
    log.setMargin(new Insets(5,5,5,5));
    log.setEditable(false);
    JScrollPane logScrollPane = new JScrollPane(log);
    //Create a file chooser
    final JFileChooser fc = new JFileChooser();
    //Create the open button
    ImageIcon openIcon = new ImageIcon("images/open.gif");
    JButton openButton = new JButton("Open a File...", openIcon);
    openButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    int returnVal = fc.showOpenDialog(FileChooserDemo.this);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
    File file = fc.getSelectedFile();
    //this is where a real application would open the file.
    log.append("Opening: " + file.getName() + "." + newline);
    } else {
    log.append("Open command cancelled by user." + newline);
    //Create the save button
    ImageIcon saveIcon = new ImageIcon("images/save.gif");
    JButton saveButton = new JButton("Save a File...", saveIcon);
    saveButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    int returnVal = fc.showSaveDialog(FileChooserDemo.this);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
    File file = fc.getSelectedFile();
    //this is where a real application would save the file.
    log.append("Saving: " + file.getName() + "." + newline);
    } else {
    log.append("Save command cancelled by user." + newline);
    //For layout purposes, put the buttons in a separate panel
    JPanel buttonPanel = new JPanel();
    buttonPanel.add(openButton);
    buttonPanel.add(saveButton);
    //Explicitly set the focus sequence.
    openButton.setNextFocusableComponent(saveButton);
    saveButton.setNextFocusableComponent(openButton);
    //Add the buttons and the log to the frame
    Container contentPane = getContentPane();
    contentPane.add(buttonPanel, BorderLayout.NORTH);
    contentPane.add(logScrollPane, BorderLayout.CENTER);
    public static void main(String[] args) {
    JFrame frame = new FileChooserDemo();
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    frame.pack();
    frame.setVisible(true);

    simply use file.getPath()
    That should do it!Thank you !
    It takes care of the problem !!

  • How to get the full image directory when i upload the image to web page???

    hai, how to get the full image directory when i upload the image to web page???
    here is the example:
    <form action="uploadfile.jsp" method="post">
    image<input type="file" name="image" />
    <input type="submit" value="submit"/>
    <%
    String s=request.getParameter("image");
    %>
    <%=s%>
    </form>
    i upload the image from C:\image\center.gif. i use request.getParameter just can get the image name like "center.gif". Can anybody help me how to get the full path name. Thanks a lot..

    There is no need to get the path. It is also fairly pointless as the server cannot access the client's local file system.
    Carefully read this article how you can upload files the right way: http://balusc.blogspot.com/2007/11/multipartfilter.html

  • How to get the Text name to pass in the  parameter header in save_text

    Hi,
      I am trying to change the long text of operation for historical order by using the flat file.I am using the save_text to do this.I would like to know how  to get the text name in order to pass the parameter header in save_text.
      I went to the tcode iw62 to get the header information of the long text.300100000009200000001
    i would like to know what this 1000000092 indicates and where is this value updated in the table so that i can link it thru the order no  to get the link and pass it in the text_name.
      can anyone help me out?
    krishnan

    Hi,
    Your query is.
    I went to the tcode iw62 to get the header information of the long text.300100000009200000001
    i would like to know what this 1000000092 indicates
    In above number
    300 - Client
    1000000092 - AUFPL - Routing number of operations in the order (You can fetch this from table HIVG)
    00000001 - APLZL - General counter for order ( You can fetch this from table HIVG).
    BR,
    Vijay

  • How to get the specific name of the workset which is currently selected by the user in sap portal 7.0

    Dear Expert,
    I have one requirement like to read the selected workset name in portal by the current user.I have read two documents regarding how to retrieve the PCD contents (iViews, Pages, Worksets and Roles) and its properties like Created by, Changed by, Last changed by and others using PCD API.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6112ecb7-0a01-0010-ef90-941c70c9e401?overridelayout=true
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/508baf88-9335-2d10-efa6-c6ad61e5fc4b?quicklink=index&overridelayout=true
    But I am not able to understand how to get the specific name of the workset which is currently selected by the user.Can you please help me.
    I am using portal 7.0.
    Thanks & Regards,
    Patralekha

    Hi Expert,
    I found that we can use Interface INavigationHelperService to read Portal Role selected by user at runtime from http://scn.sap.com/thread/52194
    But this class is available in SAP NetWeaver 7.30 Enterprise Portal .
    But in SAP NetWeaver 7.0 Enterprise Portal that interface is not available.
    INavigationService is available there.
    But didn't get any proper discussion on this interface for the same requirement.
    Can you please help me.
    Thanks & Regards,
    Patralekha

  • How to get the VARIANT name in the program

    Hi Guys,
    Can somebody tell me how to get  the VARIANT name in a program.
    I have to perform some code with specific variant only. So I want to check in program which variant has been used to call the program.
    Thanks,

    Hi,
    Variants are stored in table VARI and VARID.
    You can use RS_ALL_VARIANTS_4_1_REPORT to get all the variants for a report program.
    please check out the link below it will be helpful to you
    Re: Programs for a transaction variant
    Hope this helps.
    ashish

  • How to get the role name in which query is published ?

    Hi Experts,
       Is there any table where i can get the name of the role in which a particular query is published. I know that if i have a role , i can check in pfcg giving that role name and in menu tab i can see all the queries published under that role. But if i know query but not role how to get the role name . Is there any table or functon modules or programs to get the information.
    Thanks & Regards
    Vamsi Kiran

    Check this table
    AGR_HIER

  • How to get the field name of an internal table during runtime?

    How to get the field name of an internal table during runtime?

    Hi  Sudhir,
    Declare and Use Get Cursor Field in Your Prm to get the field Name of the Intenal Table
    Example Code:
        <b>  DATA: v_field(60).                        " Insert this code.
         GET CURSOR FIELD v_field.        " Insert this code.</b>
         <b>CHECK v_field = 'ITAB-KUNNR'.    " Insert this code. (or)
    Write: v_field.</b>
    Regards,
    Ramganesan K.

  • How to get the column names of the table into the Dashboard prompt

    how to get the column names of the table into the Dashboard prompt
    Thanks & Regards
    Kishore P

    Hey john,
    My requirement is as follows
    I have created a Rank for Total sales by Region wise i.e RANK(SUM(Dollars By Region)) in a pivot table.
    My pivot table looks like this
    COLUMN SELECTOR: TOTAL US , REGION , DISTRICT , MARKET
    ---------------------------------------------------- JAN 2009          FEB 2009        MAR 2009
    RANK              REGION                  DOLLARS           DOLLARS        DOLLARS DOLLARS
    1 CENTRAL 10 20 30 40
    2 SOUTHERN 10 30 30 70
    3 EASTERN 20 20 20 60
    4 WESTERN 10 20 30 40
    When i select the District in column selector
    Report has to display rank based on Total Sales by District. i.e
    ------------------------------------------------- JAN 2009         FEB 2009       MAR 2009
    RANK             DISTRICT              DOLLARS           DOLLARS        DOLLARS DOLLARS
    for this i need to change the fx of rank i.e RANK(SUM(Dollars By Region)) to RANK(SUM(Dollars By District)) and fx of Region i.e Markets.Region to Markets.District dynamically.
    so , i need to capture column name of the value selected from the column selector and dynamically i need to update the fx 0f RANK & fx of region.
    do you have any solution for this?
    http://rapidshare.com/files/402337112/Presentation1.jpg.html
    Thanks & Regards
    Edited by: Kishore P on Jun 24, 2010 7:24 PM
    Edited by: Kishore P on Jun 24, 2010 7:28 PM

  • How to get the full result of a google search?

    How to get the full results of a google search?
    Nov 23, 2006 2:28 AM
    Hi, Friends,
    I want to build a URL collector as a seamless and integrated part of my desktop application in java language which can access the full search results of google, but i am not sure the right way? what is the best way to do that in java?
    Where to find the relevant materials for the problem?
    thanks a lot

    Cross post - http://forum.java.sun.com/thread.jspa?threadID=788627&messageID=4481369#4481369

  • How to get the function name/ID  of the current page

    HI,
    I searched the forum and google, but it is not clear on how to get the function name of the current page.
    I have 4 functions in my self service A ,B,C,D (seeded page links ) they all have to go to a page called hhhPG. Based on which function user is clicks I have to show the data in hhhPG.
    so my question is how to get the function name ? I mean I need to know if user click on link A , B, C or D link and came to this page.
    I found below in one forum and also there is getfunctionID in pageContext , but I do not know what to pass to getfunctionid("???") to get value.
    FunctionSecurity funcSecurity = pageContext.getFunctionSecurity();
    Or is there a better way of know where user is coming from ? like geturl....
    Please help, I need this ASAP.
    Thank you.

    Use below to find out how the user came into the page
    FunctionSecurity funcSecurity = pageContext.getFunctionSecurity();
    boolean isFunc1 = funcSecurity.testFunction(funcSecurity.getFunction("YOUR_FUNCTION_SHORT_NAME1"));
    boolean isFunc2 = funcSecurity.testFunction(funcSecurity.getFunction("YOUR_FUNCTION_SHORT_NAME2"));
    boolean isFunc3 = funcSecurity.testFunction(funcSecurity.getFunction("YOUR_FUNCTION_SHORT_NAME3"));
    boolean isFunc4 = funcSecurity.testFunction(funcSecurity.getFunction("YOUR_FUNCTION_SHORT_NAME4"));
    So one of them will be true based on the function the user came in.
    Write your logic based on these flags.
    Regards,
    Peddi.

Maybe you are looking for

  • Adobe software - How I want to buy it

    As a video editor I only want software that is of use to me in my activity, namely: - Adobe Premiere Adobe Encore Adobe Audition Adobe After Effects Adobe Photoshop + export plug-ins (media encoder etc) What I would like is for Adobe to bundle this s

  • 3rd Gen 15g isnt recognized by updater, and unknown pic on ipod HELP!

    The ipod updater is not recognizing the ipod. Even though it is plugged in and it says do not disconnect. The ipod it self, shows a picture of the end of a pin connector with an arrow on it, and it wont go away. Please help! The ipod was working unti

  • Final Cut sometimes creates a 2nd file with a "-v" suffix when capturing

    Hi When I capture from dvcam tapes in Final Cut Pro 5, the capture file is sometimes splitted into two files, the first one with the specified name and the second one, much smaller, with the specified name plus "-v" appended as a suffix. If I delete

  • SAP LSO Learning Solution - Content Player

    We don't want to use the Java based online/offline content player for viewing/displaying course content.  Does anyone know if the content is compatible with either Flash or Media Player?  What is the format of how the content is delivered? Regards, T

  • Backup and Restore VM

    I have a host server that has a C: drive and a D: drive. Right now I only have one VM running and it is located on the D: drive. I need to reformat the disk that the D: drive is on. For some reason it was created as a MBR type disk and I need to dele