Skip to content

childFile.lastModified needs to be coverted to string #287

@MehdiZonjy

Description

@MehdiZonjy

Hello
I just created a fresh ReactNative project and installed the latest version (2.3.0). and i'm getting the following error
RNFSManager.java:262: error: incompatible types: long cannot be converted to String

It seems that the problem is in the following line
fileMap.putString("mtime", childFile.lastModified());

childFile.lastModified needs to be converted from long to string before adding it to the fileMap
The following fixes the issue
fileMap.putString("mtime", String.valueOf(childFile.lastModified()));

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions