Skip to main content
May 3, 2011
Question

File api - directory exists but returns false.

  • May 3, 2011
  • 1 reply
  • 1194 views

Flash Media Server 4.

in main.asc - onconnect.

var my_dir = new File("/xxx/yyy/atest");

trace(my_dir.exists); // false

if ( my_dir.isDirectory ) // false

Do I need to configure something to use API.

I know the directory exists and as shown below.

under the directory /xxx/yyy/

drwxrwsr-x 2 flash content 512 May  3  2011 atest

Thanks

    This topic has been closed for replies.

    1 reply

    Adobe Employee
    May 5, 2011

    Most probably your directory "xxx" is not located under your fms application to which you are connecting because you can only use file apis for files and folders under your fms application to which you are connecting?

    If its already under your application and still you are getting false then please provide your FMS server details which you are using.

    - Amit

    May 5, 2011

    I tried using symlink from the application and tried still it failed. I also

    tested creating local directory it failed.

    /opt/app/adobe/fms/applications/myapp - location of app

    /content - nas location

    under myapp directory created a symlink to /content

    ln -s /content .

    under myapp directory it created a content directory.

    I tried to access content/my_test - directory and it gives false.

    Do I need to enable something here to to know if the file or directory

    exists.

    I also tested by created a local directory and tested it also fails.

    #Version: 1.0

    #Start-Date: 2011-05-05 11:27:17

    #Software: Adobe Flash Media Server 4.0.0 r1121 x86

    Thanks for all the help.

    Adobe Employee
    May 6, 2011

    Under myapp folder if are you able to browse those folders then it should work. I also tried at my end by creating symbolic links on FMS 4.0.0.1121 on x86 machine and it is working for me. Just check once again on clean machine with some different folder names.

    -Amit