Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13440] TiAPI: Titanium.Filesystem.File setHidden() throws an exception

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.1.0
Fix Version/sn/a
ComponentsCore
Labelsn/a
ReporterAnkit Thakur
AssigneeUnknown
Created2012-11-16T11:28:17.000+0000
Updated2018-02-28T20:03:46.000+0000

Description

Titanium.Filesystem.File's setter method setHidden(), throws exception (setHidden method not found) in Android platform and is not hiding the files in iOS. *Provided test case*
var rootDirectoryPath = Titanium.Filesystem.getExternalStorageDirectory();
var directoryPath = String.format('%s%s', rootDirectoryPath, 'ImagesFolder');
var directory = Titanium.Filesystem.getFile(directoryPath);
if (!directory.exists()) {
    directory.createDirectory();
}
var imagePath = String.format('%s%s%s', directoryPath, fileSeperator, 'image.png');
var file = Titanium.Filesystem.getFile(imagePath);
file.write(image);
file.setHidden(true);
*Simplified test case*
var file = Titanium.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, '', 'KS_nav_ui.png');
file.setHidden(true);

Comments

  1. Daniel Sefton 2013-04-06

    Tested and confirmed on Samsung Galaxy S3 Android 4.0.4 with Ti SDK 3.1 CI. Throws an exception; iOS doesn't. Not tested "hidden" behavior, but at the very least the documentation needs updating.

JSON Source