Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2335] iOS: Filesystem method spaceAvailable should return bytes available instead of a boolean [API SCRUB]

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:58:48.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M02
ComponentsiOS
Labelsapidoc, defect, filesystem.spaceavailable, ios, release-1.6.0
Reporterjtobias
Assigneejtobias
Created2011-04-15T03:17:00.000+0000
Updated2011-04-17T01:58:48.000+0000

Description

ENVIRONMENT:

[From titanium_mobile/dist/os x/…/version.txt] version=1.5.0
timestamp=11/12/10 10:37
githash=937631f

STEPS TO REPRODUCE:
1) Pull down the latest titanium_mobile from github
2) Note …/apidoc/ File.tdoc says:
spaceAvailable: return boolean to indicate if the path has space available for storage
3) Note implementation (code in TiFilesystemProxy.m) returns TRUE if space available, FALSE if not

SUGGESTED FIX:
Return an integer (unsigned, 64-bit?) that shows the number of bytes available; use 0 for none.
(Easy to do per code, and the android 2.0 tdoc apparently already says this: platform deviation?)

ISSUES:
• How to sync up with Android folks on the new "spec" created from comparing iOS and Android "realities"
• Thomas helped me write this per QA "Best Practices" but RFC is always welcome on how to improve the first of many LH tickets
(Request for Comments)

ISSUES:

I don't have Lighthouse permissions / access to set "Who's responsible"

Comments

  1. jtobias 2011-04-15

    Per Ralf, milestone past to 1.6.0 to not interrupt 1.5.0, and using existing "apidoc" keyword

  2. jtobias 2011-04-15

    A drillbit test: valueOf(file.spaceAvailable()).shouldBeNumber()

  3. Jeff Haynie 2011-04-15

    (from [1ddee72f604a27afa835aa53cc3ddc68f71fd538]) [#2335 state:fixed-in-qa] Simple oneliner is simple. https://github.com/appcelerator/titanium_mobile/commit/1ddee72f604a27afa835aa53cc3ddc68f71fd538"> https://github.com/appcelerator/titanium_mobile/commit/1ddee72f604a...

  4. Stephen Tramer 2011-04-15

    Tested via KS: Platform->Filesystem->check output

    Tested sim 4.2.1 release, iPod 3GT 4.2.1 release.

JSON Source