Directory related functions in LrFileUtils

I've been wanting an "isDirectory()" function for LrFileUtils. Consider this a request to add such in the future.
I've been trying to fabricate something similar from the existing APIs in the meantime. In the process I have discoverred the following two issues:
the recursiveDirectoryEntries/recursiveFiles functions (and maybe directoryEntries as well) do not return any error indication if the passed name is for a file, or for something non-existent. It seems like they should. Ideally two different indications for those two different scenarios, so that one could tell the difference.
isEmptyDirectory() returns true if the name is for a file. I don't think I tested passing it the name of something non-existent. Also, it would be nice to get more information from fileAttributes(), specifically around whether the named thing is a directory.

Doh! :-) Indeed it does. I must confess I saw the method in the summary but never even read it's description, assuming that it would just return a true/false and wasn't useful for what I was doing.
I've just tried a few examples with it. It mostly works as I expect, with one exception, which you may very will find to be nitpicky. I've found that Lr is usually happy regardless of whether I use "/" or "\" as a separator (on Windows, at least), except that "//foo" and "//foo/bar" return false even though "\\foo" and "\\foo\bar" return true. "//foo/bar/baz" works fine. I really have no clue if this is an Lr quirk or a Windows quirk.
Regardless, I'm satisfied and moving along. Thanks Eric!

Similar Messages

  • The DNS server has encountered a critical error from the Active Directory. Check that the Active Directory is functioning properly. The extended error debug information (which may be empty) is "". The event data contains the error.

    got event ID 4015 and source DNS-Server-Service. please suggest how to fix this issue
    The DNS server has encountered a critical error from the Active Directory. Check that the Active Directory is functioning properly. The extended error debug information (which may be empty) is "". The event data contains the error.
    Raj

    Hi
     first run "ipconfig /flushdns" and then "ipconfig /registerdns" finally restart dns service and check the situation,also you can check dns logs computer management ->Event viewer->Custom Views->Server roles->DNS.

  • Keep getting error when trying to use =related function in PowerPivot

    Greetings,
    I have created a relationship between two tables based on a common field in PowerPivot, and whenever I use the =related() function to try and bring data from a field in one table to a field in another table, I keep getting and error message that says:
    The column 'XXXX[xxxx]' either doesn't exist or doesn't have a relationship to any table available in the current context.
    Any ideas? I've made this work before in a different dataset so I'm not sure what I'm missing. I have a feeling it might be really basic, but I'm spinning my wheels here.
    Thanks very much!
    MFW

    Hi MFW,
    This sounds like the table where you are trying to use the RELATED function from is on the
    one side of the one-to-many relationship (i.e. the relationship arrow is pointed towards it). If in reality there is only a
    one-to-one relationship between the data and you only need to bring the data from one table to the over, you can simply reverse the direction of the relationship and the RELATED function will work as expected. If this is not the case then you'll
    need to use RELATEDTABLE instead of RELATED and some kind of aggregation or computation that ensures that a single value is returned  for the column you are trying to get data from. There is also another function called CALCULATE which can be used for
    this scenario.
    Imagine that we have two simple tables: Table1 and Table2...
    Table1
    Column1
    Column2
    1
    A
    2
    B
    Table2
    Column1
    Column2
    1
    AA
    2
    BB
    ...and create a relationship where Table1 is on the many side and Table2 is on the one side i.e. Table1 -> Table2
    We could use a number of methods to pull the the values from Column2 in Table1 into a new Calculated Column in Table2.
    If the column we are trying to pull contains text values then we could use a combination of the CALCULATE and LASTNONBLANK function:
    =CALCULATE(LASTNONBLANK(Table1[Column2], TRUE()))
    If the Table1[Column2] contained only numeric or date values then we could use a combination of the RELATEDTABLE and MAXX functions:
    =
    MAXX(
    RELATEDTABLE(Table1),
    Table1[Column2]
    An alternative to the DAX directly above is to use the CALCULATE and MAX functions:
    CALCULATE(MAX(Table1[Column2]))
    You can learn more about the functions I have referred to below:
    CALCULATE
    LASTNONBLANK
    RELATEDTABLE
    MAXX
    Regards,
    Michael Amadi
    Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to vote it as helpful :)
    Website: http://www.nimblelearn.com, Twitter:
    @nimblelearn

  • Relative function in FR reports

    I want to use a function in FR reports equal to the @Relative function in Essbase NOT the Relative Function found in FR (as it seems to only work on SAP / SSAS database.
    Basically I want the user to select POV x and take all the Lvl 0 members under that member.
    For Example if they are using this on Cost Centers dimension. They pick "Summary Node" x and it will generate all the level 0 members under that summary node only. I don't want all level 0 for the entire dimension. I also don't want all the summary points under that member (ie "IDESC" won't work).
    Must be a stupid thing I'm missing cause this should be an obvious one.
    I'm using 11.1.1.3 Essbase and FR
    Edited by: user11991787 on 28-Apr-2010 12:57 PM

    I don't think what your trying to do is available "out of the box", we have used a workaround to do what you want:
    - include idescendants for the member but apply suppression on the member names that ended in rollup.
    (we were lucky in that the parent members were standardized to contain rollup as the description name).
    Cheers, Iain

  • Is therre drag and relate functionality in CRM  4.0 busi pack for sap 60.2

    Is there drag and relate functionality in CRM  4.0 busi pack for sap 60.2 .
    Rajendra redekar

    Hi Sriram,
    Mobile component changed to .Net  in 5.0 so the first upgrade of support packages should not be a problem.  Your only concern will be the rollout of the support package upgrade to the users in the field.
    I don't know much about the upgrade from 4.0 to 7.0 and the complications around the custom code migration from vb to .net.  I imagine this is something you may need to talk to SAP about.
    Depending on the amount of work involved it may be easy to upgrade the CRM system and do a re-implementation of the mobile component.
    Good luck.
    Cheers
    Andrew

  • Unable to enable the adaptive firewall: No ALTQ support in kernel ALTQ related functions disabled

    No ALTQ support in kernel ALTQ related functions disabled
    OS X Server: How to enable the adaptive firewall - Apple Support
    Recently ran the latest OS X Yosemite Server Updates: OS X v10.10.3 and Server v4.1.  Tried to enable the "adaptive firewall" by following the steps in Apple's article (see above) and encountered the error after the second line of commands
    Charlie$ sudo pfctl -f /etc/pf.conf
    pfctl: Use of -f option, could result in flushing of rules
    present in the main ruleset added by the system at startup.
    See /etc/pf.conf for further details.
    No ALTQ support in kernel
    ALTQ related functions disabled
    server:~ Charlie$

    I'm not sure that is an error, it is a warning.
    The Mac kernel is not compiled with support for ALTQ so you can't use those features.
    Carry on & test your firewall is working as you expect.

  • The only working print-related function in BioBench1.2 on my PC is the "Print Report", all the other "Print" functions gave me "Error, the printer is not set up correctly".

    I used to print all my BioBench data by first exporting them to Excel and then print from there. Recently I need to print some of the screen shots and some data directly from array analysis, but when I click on the "print" buttons, the "Error, the printer is not set up correctly" message occurs. The only thing I can print from BB without this error is the report printing function. I have a postcript printer and I have set the postscript option to be "true"... Thanks !

    This problem is a result of a limitation in Windows 9x regarding the size of an image that you can send to the printer. The problem does not occur on Windows 2000/NT. This problem appeared with the increased color options of LabVIEW 6.0 on which the BB1.2 is based.Although it is not immediately obvious, your video driver and settings play a role in printing.
    1. Try adjusting the color palette your driver uses (i.e., 256 color, high olor, true color). The error may occur only in one of these modes. Also, change the resolution (number of pixels) to represent the Screen Area; e.g., change from a 1024 x 768 display to an 800 x 600 pixel display.
    2.Certain video drivers also support "acceleration" modes. Using a non-accelerated mode often eliminates the error. For
    Windows 95/98, right-click on your My Computer icon and select "Properties" from the pop-up
    menu. On the Performance tab, click the Graphics button and change the Hardware Acceleration (e.g., if it is set to "Full", lower the setting a notch or two); for Windows 2000/NT, right-click on your Desktop and select "Properties" from the pop-up menu. On the Settings tab, click the Advanced button and go to
    Troubleshooting.
    3.In Windows, the standard VGA driver provided by the operating system is very stable. Try using this driver in place of the specific one written for your video hardware. If the error is eliminated, there is likely a problem with your vendor-provided video driver.
    4.These errors are most often fixed with the latest
    video/printer driver. Be sure to contact your hardware manufacturer and install the latest driver. An easy way to determine if your error is "driver-related" is to move your code to another machine (and hopefully a different set of drivers) and see if th
    e error persists. If the problem is printer related, try another printer.
    5.Make sure there are at least 100M avalible space in your C: drive. If not, set the virtual memory to the other drive which has larger available space.

  • Creating an own object-relational function.

    Hi
    I'd like to create a new function on a object-relational datatype. Where can I find information about comparable methods like SDO_AREA and how to build an own.
    Thanks
    Chris

    You can use PL/SQL to write such functions.
    I have written many functions that operates on SDO_Geometry objects.
    This exampla calculates the minimal bounding rectangle of a sdo_geometry:
    FUNCTION Calc_mbr( Geo Mdsys.Sdo_geometry )
    RETURN VARCHAR2 IS
    Resultat VARCHAR2( 100 );
    Antelem NUMBER;
    Antord NUMBER;
    X1 NUMBER;
    Y1 NUMBER;
    X2 NUMBER;
    Y2 NUMBER;
    X NUMBER;
    Y NUMBER;
    E NUMBER;
    C NUMBER;
    Startingoffset NUMBER;
    Startingoffsetnext NUMBER;
    Etype NUMBER;
    Interpretation NUMBER;
    BEGIN
    Resultat := NULL;
    IF NOT Geo.Sdo_point IS NULL THEN
    Resultat :=
    TO_CHAR( Geo.Sdo_point.Y ) || ';' || TO_CHAR( Geo.Sdo_point.X ) || ';' ||
    TO_CHAR( Geo.Sdo_point.Y ) ||
    ';' ||
    TO_CHAR( Geo.Sdo_point.X ) ||
    RETURN Resultat;
    END IF;
    IF Geo IS NOT NULL THEN
    Antelem := Geo.Sdo_elem_info.COUNT( );
    Antord := Geo.Sdo_ordinates.COUNT( );
    E := 1;
    WHILE E < Antelem LOOP
    Startingoffset := Geo.Sdo_elem_info( E );
    Etype := Geo.Sdo_elem_info( E + 1 );
    Interpretation := Geo.Sdo_elem_info( E + 2 );
    IF ( Antelem > E * 3 ) THEN
    Startingoffsetnext := Geo.Sdo_elem_info( E + 3 );
    --Start of ordinates for next element
    ELSE
    Startingoffsetnext := Antord + 1;
    END IF;
    IF Etype > 0 THEN
    IF ( E = 1 ) THEN -- initalization .
    X1 := Geo.Sdo_ordinates( 1 );
    X2 := X1;
    Y1 := Geo.Sdo_ordinates( 2 );
    Y2 := Y1;
    END IF;
    C := Startingoffset;
    WHILE C < Startingoffsetnext LOOP
    X := Geo.Sdo_ordinates( C );
    Y := Geo.Sdo_ordinates( C + 1 );
    IF X < X1 THEN
    X1 := X;
    ELSIF X > X2 THEN
    X2 := X;
    END IF;
    IF Y < Y1 THEN
    Y1 := Y;
    ELSIF Y > Y2 THEN
    Y2 := Y;
    END IF;
    C := C + 4; -- x,y,z,m
    END LOOP;
    END IF;
    E := E + 3; -- Elements are always triplets.
    END LOOP;
    Resultat :=
    TO_CHAR( Y1 ) || ';' || TO_CHAR( X1 ) || ';' || TO_CHAR( Y2 ) || ';' ||
    TO_CHAR( X2 ) ||
    ELSE
    Resultat := NULL;
    END IF;
    RETURN Resultat;
    END;

  • HT3737 Desktop directory not functioning as expected

    When I open up desktop as a window (directory) the listing options are grayed out, so if, for instance, I want to list by "Date Modified" it will not work.
    All the listing options at the top of the page are non functional, where can I fix this? OSX Lion 10.7.4
    Thanks!

    Thanks for responding so quickly.  I had just determined it was a "pin" issue.  I removed the pin and now it works normally.  Seems like mobile browsers should be allowed to scroll horizontally while zoomed in even if the menu bar is pinned.
    The test site is www.creativegraphicsnc.com/hold/bluedog
    I'm a Sitegrinder user looking to make a change and am new to Muse.  I've got a lot to learn.

  • How to close tomcat's directory browse function?

    when running tomcat,the default setting is when no start page(such as index.htm,index.jsp) in the directory,tomcat will display the directory context.how can I close this function?thanks.

    Under Tomcat v4.0.3, in the <Tomcat_Home>/conf/web.xml file is a set of default servlets with parameters. One of these is :
    <init-param>
    <param-name>listings</param-name>
    <param-value>true</param-value>
    </init-param>
    changing it to false does prevent directory browsing on my system. It's not a pretty access denied screen, but it does stop browsers seeing your contents, also any sub-directories. Hope that helps.

  • Like Ini related functions, is there any functions for reading other functions like .c, .h file

    Hi,
          For reading the *.ini file there are many Ini realted functions. Like that I need in built function in CVI to read the files like
    *.c, *.h line by line. Actually string searching function is not helping me as I want to read it line by line and perform
    the operations in which I am interested.
    Can anyone help me on this?
    Thanks and Regards
    Nagraj B

    It's not clear to me what you are aiming to, but reading a text file line by line can be accomplished by ReadLine () function.
    Parsing the line read to intercept special keyword can be done via regular expression instrument driver, which is included in CVI distribution.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • DATE and Time related FUNCTIONS in SQL

    I want to know the Answers(Queries) for below mentioned Question.
    Q!--list the name of account holders who have opened a/c in the last 5 days
    Q2--week-wise no of account opened in Last month?
    Q3--list branch-wise,product-wise total amount as on Last Friday?
    Q4--list the customers who opened a/c in first week of last month?
    Q5-- how many customers opened a/c in last date of previous month?
    IN SQL language

    Unfortunately your post is off topic as it's not specific to SQL Server Samples and Community Projects.  
    This is a standard response I’ve written in advance to help the many people who post their question in this forum in error, but please don’t ignore it.  The links I provide below will help you determine the right forum to ask your question
    in.
    For technical issues with Microsoft products that you would run into as an end user, please visit the Microsoft Answers forum ( http://answers.microsoft.com ) which has sections for Windows, Hotmail,
    Office, IE, and other products.
    For Technical issues with Microsoft products that you might have as an IT professional (like technical installation issues, or other IT issues), please head to the TechNet Discussion forums at http://social.technet.microsoft.com/forums/en-us, and
    search for your product name.
    For issues with products you might have as a Developer (like how to talk to APIs, what version of software do what, or other developer issues), please head to the MSDN discussion forums at http://social.msdn.microsoft.com/forums/en-us, and
    search for your product or issue.
    If you’re asking a question particularly about one of the Microsoft Dynamics products, a great place to start is here: http://community.dynamics.com/ 
    If you think your issue is related to SQL Server Samples and Community Projects and I've flagged it as Off-topic, I apologise.  Please repost your question and include as much detail as possible about your problem so that someone can assist you further. 
    If you really have no idea where to post your question please visit the Where is the forum for…? forum http://social.msdn.microsoft.com/forums/en-us/whatforum/ 
    When you see answers and helpful posts, please click Vote As Helpful,
    Propose As Answer, and/or Mark As Answer
    Jeff Wharton
    MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt), MCT, MCSA, MCSE: BI
    Blog: Mr. Wharty's Ramblings
    Twitter: @Mr_Wharty
    MC ID:
    Microsoft Transcript

  • EHP4 directory related doubts

    Hi,
    We are doing EHP4 ready system to EHP4 upgrade and have few basic questions on this. Can you experts please share your experiences ?
    1) Download directory we have mentioned as /EHPI/EHPI (/EHPI filesystem was created by Unix team & after un-car of SAPehpi_42-10005805.SAR the EHPI directory got created) - is this ok ?
    2) In which location should we include stack.xml ? Is there any specific location or we can place anywhere in the system & put that name in stack configuration tab under configuration phase ?
    3) For the actual support pack files which we downloaded from SMP(through Solman), whether we need to uncar them and then put in /usr/sap/trans/EPS/in ? or EHPi will automatically uncar them during upgrade ?
    Also is there any specific location to place the component (EA_APPL, EA_BASIS etc) specific .SAR files ?
    Because of certain errors already our upgrade has to be reset couple of times in configuration stage. So like to cross check the above mentioned points based on your inputs.
    Also is there any step wise guide for EHP4 available ? So we got "SAP ERP 6.0 Including Enhancement Package 4 Support Release 1" or "How to install.." etc pdf guides but there we won't screen wise step guidance unlike the normal SAP version upgrade guides that are available in the market.
    We are doing EHP4 upgrade for the first time. So your help on these basic doubts will help us to proceed further.
    Thanks
    TS

    1) Download directory we have mentioned as /EHPI/EHPI (/EHPI filesystem was created by Unix team & after un-car of SAPehpi_42-10005805.SAR the EHPI directory got created) - is this ok ?
    Yes, make sure that the directory is created SIDadm. In EHP guide, it recommend to create EHPI folder under /usr/sap/
    2) In which location should we include stack.xml ? Is there any specific location or we can place anywhere in the system & put that name in stack configuration tab under configuration phase ?
    No. But it's a good practice you put under a EHPI/download directory. During the Configuration Phase, EHPI will ask for the stack.xml file where you can browse to the location where your xml file resided.
    3) For the actual support pack files which we downloaded from SMP(through Solman), whether we need to uncar them and then put in /usr/sap/trans/EPS/in ? or EHPi will automatically uncar them during upgrade ?
    No, no uncar required. EHPI will uncar them.
    Also is there any specific location to place the component (EA_APPL, EA_BASIS etc) specific .SAR files ?
    +No, you can place all files (upgrade files + SPs ) into the same directory.+

  • Need an E-mail related Function Module

    Hi,
    I need to send some kind of information or rather some notifications to the clients via e-mail. Thew information is in TEXT format. I have used FM"SO_OBJECT_SEND" but didnt helped me.
    This E-mail function would be triggered if there's any kind of failure in the transaction and the same has to be notified to the clients.
    Please suggest.
    Thanks & Regards,

    This abap mail sending program demonstrate how you can send a mail to the user SAP Office mailbox.
    REPORT ZSEND .
    TABLES: KNA1.
    data for send function
    DATA DOC_DATA  LIKE SODOCCHGI1.
    DATA OBJECT_ID LIKE SOODK.
    DATA OBJCONT   LIKE SOLI OCCURS 10 WITH HEADER LINE.
    DATA RECEIVER  LIKE SOMLRECI1 OCCURS 1 WITH HEADER LINE.
    SELECT * FROM KNA1 WHERE ANRED LIKE 'C%'.
      WRITE:/ KNA1-KUNNR, KNA1-ANRED.
    send data internal table
      CONCATENATE KNA1-KUNNR KNA1-ANRED
                             INTO OBJCONT-LINE SEPARATED BY SPACE.
      APPEND OBJCONT.
    ENDSELECT.
    insert receiver (sap name)
      REFRESH RECEIVER.
      CLEAR RECEIVER.
      MOVE: SY-UNAME TO RECEIVER-RECEIVER,
            'X'      TO RECEIVER-EXPRESS,
            'B'      TO RECEIVER-REC_TYPE.
      APPEND RECEIVER.
    insert mail description
      WRITE 'Sending a mail through abap'
                     TO DOC_DATA-OBJ_DESCR.
    CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
         EXPORTING
              DOCUMENT_DATA              = DOC_DATA
         IMPORTING
              NEW_OBJECT_ID              = OBJECT_ID
         TABLES
              OBJECT_CONTENT             = OBJCONT
              RECEIVERS                  = RECEIVER
         EXCEPTIONS
              TOO_MANY_RECEIVERS         = 1
              DOCUMENT_NOT_SENT          = 2
              DOCUMENT_TYPE_NOT_EXIST    = 3
              OPERATION_NO_AUTHORIZATION = 4
              PARAMETER_ERROR            = 5
              X_ERROR                    = 6
              ENQUEUE_ERROR              = 7
              OTHERS                     = 8.
    regards
    vinod

  • Jars for Excel related Functions in an Ecommerce Application

    Hi,
    I am currently working on an Ecommerce application .There is one requirement to download an Excel file with products and and then upload the Updated Excel file to create an order.Can somebody help me if there is an already existing jar file in Ecommerce application that contains Excel file related classes.
    Please let me know if there is any way we can find out all the jars present in our Active DCs in NWDS.
    Thanks and Regards
    Arpita Saxena

    Hi,
    First check Go to Webdynpro Perspective here go to Navigator tab and check if there are any External Library DCs. These DCs contain all the JAR files used.
    And also check Public Parts of that External Library DCu2019s Applications. Expand External Library DCu2019s Applications--Go to def. here out DC Public parts available. And Expand External Library DCu2019s Applications--Go to libraries here we can find out our jar Files
    Finally were have to find out where we can use that Public parts in your Ecommerce application. Go to you are DC-DC Meta Data-Here we can find out that Public Part Name
    By using that Public part we can easily finout what jar files we can use that DCu2019s Applications.
    Hope this helps!!
    Regards
    Vijay K

Maybe you are looking for

  • Kt3 Ultra-aru Processor Speeds?

    Hi There,     I'm running the MSI KT3 Ultra-ARU (MS-6380E v1.X) with an AMD Athlon XP 2000, I was just wondering what Athlon XP processor speeds this supports upto, and if possible what changes I might need to make to the Bios, Would I need to flash

  • Missing entries in report painter report

    Hi, I'm using report painter for P&L and Balance sheet. The report uses table GLPCT. There is an entry for downpayment made which is posted to a downpayment account and the other effect to the vendor (with an alternative recon a/c). Both the downpaym

  • Why won't Firefox open my e-mail page, after clicking the tab, from a Comcast preview page?

    I have Comcast.net. From my home page, when I click the email button, first, I must sign-in and then a preview page appears with a short list of emails. When I click the tab to open the entire email page, the entire page does not open as it should. W

  • Some movies/categories won't connect to the itunes store.

    Some movies/categories won't connect to the itunes store.  When we try to access kids/family genre it says it can't connect.  But we can see some kids/family movies from top movies, but others not? For instance when I search on a movie it finds the m

  • Sending Unicode HTML email from Oracle

    Dear All, How we can send the HTML email from Oracle in Unicode format (I am using Arabic Language, to be specific). So far I have tried the following solutions (using utl_smpt) without any success (either i see junk characters in the email or see qu