misonyo %!s(int64=7) %!d(string=hai) anos
pai
achega
4fa8cce4f5
Modificáronse 6 ficheiros con 45 adicións e 45 borrados
  1. 7 7
      mkdir_sample.c
  2. 7 7
      opendir_sample.c
  3. 7 7
      readdir_sample.c
  4. 7 7
      rename_sample.c
  5. 9 9
      stat_sample.c
  6. 8 8
      tell_seek_dir_sample.c

+ 7 - 7
mkdir_sample.c

@@ -1,11 +1,11 @@
-/* 
- * Copyright (c) 2006-2018, RT-Thread Development Team 
- * 
- * SPDX-License-Identifier: Apache-2.0 
- * 
- * Change Logs: 
+/*
+ * Copyright (c) 2006-2018, RT-Thread Development Team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Change Logs:
  * Date             Author      Notes
- * 
+ *
  */
 /*
  * 程序清单:创建目录

+ 7 - 7
opendir_sample.c

@@ -1,11 +1,11 @@
-/* 
- * Copyright (c) 2006-2018, RT-Thread Development Team 
- * 
- * SPDX-License-Identifier: Apache-2.0 
- * 
- * Change Logs: 
+/*
+ * Copyright (c) 2006-2018, RT-Thread Development Team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Change Logs:
  * Date             Author      Notes
- * 
+ *
  */
 /*
  * 程序清单:打开目录

+ 7 - 7
readdir_sample.c

@@ -1,11 +1,11 @@
-/* 
- * Copyright (c) 2006-2018, RT-Thread Development Team 
- * 
- * SPDX-License-Identifier: Apache-2.0 
- * 
- * Change Logs: 
+/*
+ * Copyright (c) 2006-2018, RT-Thread Development Team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Change Logs:
  * Date             Author      Notes
- * 
+ *
  */
 /*
  * 程序清单:读取目录

+ 7 - 7
rename_sample.c

@@ -1,11 +1,11 @@
-/* 
- * Copyright (c) 2006-2018, RT-Thread Development Team 
- * 
- * SPDX-License-Identifier: Apache-2.0 
- * 
- * Change Logs: 
+/*
+ * Copyright (c) 2006-2018, RT-Thread Development Team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Change Logs:
  * Date             Author      Notes
- * 
+ *
  */
 /*
  * 程序清单:更改名称

+ 9 - 9
stat_sample.c

@@ -1,11 +1,11 @@
-/* 
- * Copyright (c) 2006-2018, RT-Thread Development Team 
- * 
- * SPDX-License-Identifier: Apache-2.0 
- * 
- * Change Logs: 
+/*
+ * Copyright (c) 2006-2018, RT-Thread Development Team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Change Logs:
  * Date             Author      Notes
- * 
+ *
  */
 /*
  * 程序清单:取得状态
@@ -23,8 +23,8 @@ static void stat_sample(void)
 {
     int ret;
     struct stat buf;
-    ret=stat("/text.txt", &buf);
-    if(ret==0)
+    ret = stat("/text.txt", &buf);
+    if (ret == 0)
         rt_kprintf("text.txt file size = %d\n", buf.st_size);
     else
         rt_kprintf("text.txt file not fonud\n");

+ 8 - 8
tell_seek_dir_sample.c

@@ -1,11 +1,11 @@
-/* 
- * Copyright (c) 2006-2018, RT-Thread Development Team 
- * 
- * SPDX-License-Identifier: Apache-2.0 
- * 
- * Change Logs: 
+/*
+ * Copyright (c) 2006-2018, RT-Thread Development Team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Change Logs:
  * Date             Author      Notes
- * 
+ *
  */
 /*
  * 程序清单:保存与设置读取目录位置
@@ -30,7 +30,7 @@ static void telldir_sample(void)
     /* 打开根目录 */
     rt_kprintf("the directory is:\n");
     dirp = opendir("/");
-    
+
     for (dp = readdir(dirp); dp != RT_NULL; dp = readdir(dirp))
     {
         /* 保存第三个目录项的目录指针*/