2016-08-18 45 views
0

如何检查(控制)特定文件中的.avi格式视频文件,是否超过0KB并且可读?例如如何检查(控制)特定文件中的.avi格式视频文件,是否超过0KB并且可读?

; 我有一个录像机按钮,我点击它,然后我的功能记录1分钟,并保存到文件中作为test.avi(此功能在一段时间(true){}语句)

in while(true)

另存为test.avi

另存为test2.avi 。

另存为test8.avi

所以,我怎么能检查此test.avi和所有其他videofiles,如果(test.avi不0KB和可读性),我该怎么办?

int main(void) { 

    while (true) 
    { 
     //Check if test.avi ready 
     if (test.avi is not 0KB and readable) 
     { 
      doSomeStuff01(); 

     } 
     /* Check one more Time 
     else 
     { 

     }*/ 
     //Check if test2.avi ready 
     if (test2.avi is not 0KB and readable) 
     { 
      doSomeStuff02(); 
     } 
     /* Check one more Time 
     else 
     { 

     }*/ 
     //Check if test3.avi ready 
     if (test3.avi is not 0KB and readable) 
     { 
      doSomeStuff03(); 
     } 
     /* Check one more Time 
     else 
     { 

     }*/ 
     //Check if test4.avi ready 
     if (test4.avi is not 0KB and readable) 
     { 
      doSomeStuff04(); 
     } 
     /* Check one more Time 
     else 
     { 

     }*/ 
     //Check if test5.avi ready 
     if (test5.avi is not 0KB and readable) 
     { 
      doSomeStuff05(); 
     } 
     /* Check one more Time 
     else 
     { 

     }*/ 
     //Check if test6.avi ready 
     if (test6.avi is not 0KB and readable) 
     { 
      doSomeStuff06(); 
     } 
     /* Check one more Time 
     else 
     { 

     }*/ 
     //Check if test7.avi ready 
     if (test7.avi is not 0KB and readable) 
     { 
      doSomeStuff07(); 
     } 
     /* Check one more Time 
     else 
     { 

     }*/ 
     //Check if test8.avi ready 
     if (test8.avi is not 0KB and readable) 
     { 
      doSomeStuff08(); 
     } 
     /* Check one more Time 
     else 
     { 

     }*/ 

    } 


    return(0); 
} 

回答

相关问题