This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3220SF: sl_FsGetInfo(..) returns SL_ERROR_FS_FILE_IS_OPEN_FOR_WRITE (-10370L)

Part Number: CC3220SF

I would like to know if the information about the file is valid when error SL_ERROR_FS_FILE_IS_OPEN_FOR_WRITE (-10370L) is returned by function sl_FsGetInfo(..).

Thanks for response.

  • Hi Jiri,

    Getting an error return code typically means the parameters are invalid.

    In this case however most of the info is retrieved before the error is identified so most of the parameters can have their correct values.

    Yet, if you want to make sure everything is right, use this command before you open the file.

    Also note that you can't rely on the getting the right parameters' values while getting an error code since the internal behavior can be changed by a future SP.

    Br,

    Kobi

  • Hello Kobi,

    thanks for this info. Could you tell me if the information about file length is valid? I need just this particular information.

    According to documentation is information about file valid even error codes

    SL_ERROR_FS_FILE_HAS_NOT_BEEN_CLOSE_CORRECTLY

    or

    SL_ERROR_FS_FILE_IS_ALREADY_OPENED

    are returned. So I believe TI can define if information about file size is valid when SL_ERROR_FS_FILE_IS_OPEN_FOR_WRITE  is returned (for the case when no write happen to that file yet).

    Based on my simple test (made with 1 file only) the value is valid. 

    Thanks!

    Jiří

     

  • Yes, the length is valid with the existing code.

    Br,

    Kobi

  • Thanks Kobi for information!

    Jiří