Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5 > FILE TIME and FILE DATE according to the PSoC 5 RTC in File System Library (emFile) 1.20

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



FILE TIME and FILE DATE according to the PSoC 5 RTC in File System Library (emFile) 1.20
Moderator:
ANCY

Post Reply
Follow this topic



FILE TIME and FILE DATE according to the PSoC 5 RTC in File System Library (emFile) 1.20

dvorakvik posted on 26 Feb 2013 1:54 PM PST
Member
10 Forum Posts

 Hi, PSoC 5 community,

emFile Version 1.20 works as expected.

Reading original Segger emFile documentation I have not found the solution for UPDATING FILE TIME and FILE DATE according the RTC.

Any Ideas ??

Regards,

Viktor




Re: FILE TIME and FILE DATE according to the PSoC 5 RTC in File System Library (emFile) 1.20

dvorakvik posted on 27 Feb 2013 12:30 AM PST
Member
10 Forum Posts

 Hi, PSoC 5 community

User can use emFile Version 1.20 library functions FS_SetFileTime() and FS_SetFileTimeEx() etc. after creating file or directory. Library functions creating files or directory use the default timestamp. 

Regards, 

Viktor



Re: FILE TIME and FILE DATE according to the PSoC 5 RTC in File System Library (emFile) 1.20

pavloven posted on 27 Feb 2013 02:31 AM PST
Top Contributor
78 Forum Posts

I used an example from emfile user guide (page 84)
The function returns 0 (no error), but I do not seeFILE TIME and FILE DATE

void main()
{
FS_Init();      /* Initialize file system */

U32 TimeStamp;
FS_FILETIME FileTime;
FileTime.Year = 2005;
FileTime.Month = 03;
FileTime.Day = 26;
FileTime.Hour = 10;
FileTime.Minute = 56;
FileTime.Second = 14;
FS_FileTimeToTimeStamp (&FileTime, &TimeStamp);

pFile = FS_FOpen("test.txt", "r+");
test = FS_SetFileTime("test.txt", TimeStamp);
FS_FClose(pFile);

 






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20