- Added a memory configuration option. (_USE_LFN) - Added file lock feature. (_FS_SHARE) - Added fast seek feature. (_USE_FASTSEEK) - Changed some types on the API, XCHAR->TCHAR. - Changed fname member in the FILINFO structure on Unicode cfg. - String functions support UTF-8 encoding files on Unicode cfg.
		
			
				
	
	
		
			73 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			73 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 | |
| <html lang="ja">
 | |
| <head>
 | |
| <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
 | |
| <meta http-equiv="Content-Style-Type" content="text/css">
 | |
| <link rel="up" title="FatFs" href="../00index_j.html">
 | |
| <link rel="alternate" hreflang="en" title="English" href="../en/truncate.html">
 | |
| <link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
 | |
| <title>FatFs - f_truncate</title>
 | |
| </head>
 | |
| 
 | |
| <body>
 | |
| 
 | |
| <div class="para">
 | |
| <h2>f_truncate</h2>
 | |
| <p>ファイル長を切り詰めます。</p>
 | |
| <pre>
 | |
| FRESULT f_truncate (
 | |
|   FIL* <em>FileObject</em>     <span>/* ファイル・オブジェクトへのポインタ */</span>
 | |
| );
 | |
| </pre>
 | |
| </div>
 | |
| 
 | |
| <div class="para">
 | |
| <h4>引数</h4>
 | |
| <dl class="par">
 | |
| <dt>FileObject</dt>
 | |
| <dd>切り詰め対象ファイルのファイル・オブジェクトへのポインタ</dd>
 | |
| </dl>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| <div class="para">
 | |
| <h4>戻り値</h4>
 | |
| <dl class="ret">
 | |
| <dt>FR_OK (0)</dt>
 | |
| <dd>正常終了。</dd>
 | |
| <dt>FR_DENIED</dt>
 | |
| <dd>ファイルが非書き込みモードで開かれている。</dd>
 | |
| <dt>FR_DISK_ERR</dt>
 | |
| <dd>ディスク・エラーによる失敗。</dd>
 | |
| <dt>FR_INT_ERR</dt>
 | |
| <dd>不正なFAT構造または内部エラーによる失敗。</dd>
 | |
| <dt>FR_NOT_READY</dt>
 | |
| <dd>メディアがセットされていないなど、物理ドライブが動作不能状態。</dd>
 | |
| <dt>FR_INVALID_OBJECT</dt>
 | |
| <dd>無効なファイル・オブジェクト。</dd>
 | |
| </dl>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| <div class="para">
 | |
| <h4>解説</h4>
 | |
| <p>ファイルの長さが現在のファイルR/Wポインタに切り詰められます。ファイルR/Wポインタがファイルの終端を指しているときは、この関数は何の効果も持ちません。</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| <div class="para">
 | |
| <h4>対応情報</h4>
 | |
| <p><tt>_FS_READONLY == 0</tt>で、且つ<tt>_FS_MINIMIZE == 0</tt>のときに使用可能です。</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| <div class="para">
 | |
| <h4>参照</h4>
 | |
| <p><tt><a href="open.html">f_open</a>, <a href="lseek.html">f_lseek</a>, <a href="sfile.html">FIL</a></tt></p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| <p class="foot"><a href="../00index_j.html">Return</a></p>
 | |
| </body>
 | |
| </html>
 |