Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24458] iOS: getDirectoryListing() does not show all the folders in resources directory.

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionInvalid
Resolution Date2017-03-07T19:13:10.000+0000
Affected Version/sRelease 6.0.2
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterSharif AbuDarda
AssigneeEric Merriman
Created2017-03-06T17:09:01.000+0000
Updated2017-03-07T19:13:10.000+0000

Description

Hello, I am using the below code for listing the conponents in resource directory.
var win = Titanium.UI.createWindow({
    layout : 'vertical'
});
var directory = Ti.Filesystem.getFile(Ti.Filesystem.getResourcesDirectory());
var files = directory.getDirectoryListing();
console.log(files);
win.open();
I get the below response in iOS
[INFO]  (
[INFO]      "_app_props_.json",
[INFO]      "_CodeSignature",
[INFO]      "app.js",
[INFO]      "AppIcon29x29@2x.png",
[INFO]      "AppIcon29x29@2x~ipad.png",
[INFO]      "AppIcon29x29@3x.png",
[INFO]      "AppIcon29x29~ipad.png",
[INFO]      "AppIcon40x40@2x.png",
[INFO]      "AppIcon40x40@2x~ipad.png",
[INFO]      "AppIcon40x40@3x.png",
[INFO]      "AppIcon40x40~ipad.png",
[INFO]      "AppIcon60x60@2x.png",
[INFO]      "AppIcon60x60@3x.png",
[INFO]      "AppIcon76x76@2x~ipad.png",
[INFO]      "AppIcon76x76~ipad.png",
[INFO]      "AppIcon83.5x83.5@2x~ipad.png",
[INFO]      "Assets.car",
[INFO]      "Info.plist",
[INFO]      "LaunchScreen.storyboardc",
[INFO]      modules,
[INFO]      PkgInfo,
[INFO]      sha157,
[INFO]      "ti.cloud"
[INFO]  )
I don't see assets, android, image folder in my resource directory in the log. see the screenshot of my resource directory. In Android, only the android folder is missing. Here is Android log
[INFO] :   ["DefaultIcon.png","KS_nav_ui.png","appicon.png","assets","image","ti.cloud"]
Thanks.

Attachments

FileDateSize
Screen Shot 2017-03-06 at 10.32.51 PM.png2017-03-06T17:12:07.000+000015939

Comments

  1. Hans Knöchel 2017-03-06

    The images (in assets/ and image/ are inside the iOS assets-catalog (encrypted in Assets.car for app-thinning), the android folder is (of course) not copied to the iOS build since it's Android-only. To access the images, use {{Ti.Filesystem.getAsset('assets/myImage.png')}. This issue is invalid.

JSON Source