Home > functions > common > utility > @file_dialog > private > init_private.m

init_private

PURPOSE ^

privateメンバを初期化する。

SYNOPSIS ^

function private = init_private()

DESCRIPTION ^

 privateメンバを初期化する。

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function private = init_private()
0002 % privateメンバを初期化する。
0003 %
0004 % Copyright (C) 2011, ATR All Rights Reserved.
0005 % License : New BSD License(see VBMEG_LICENSE.txt)
0006 
0007 private = struct(...
0008     'current_file', [],...    % current検索file
0009     'drive_info', [],...    % 接続drive情報(Windows環境でのみ有効)
0010     'current_drive', 1,...    % 検索drive番号(Windows環境でのみ有効)
0011     'gui_handles', []);
0012 private.current_file = {};
0013 
0014 % drive_infoメンバ構造体を初期設定する。(Windows環境のみ)
0015 if strcmp( lower(computer), 'pcwin' )
0016   % 接続Drive名を検索する。(C driveからZ drives)
0017   cnt = 0;
0018   for drive = [real('C'):real('Z')]
0019     str = sprintf('%c:', drive);
0020     if length( dir(str) )
0021       % 検索ドライブが接続されている。
0022       cnt = cnt+1;
0023       drive_info(cnt) = struct('drive', str, 'cwd', str);
0024     end
0025   end
0026   if cnt,    private.drive_info = drive_info;    end
0027 end        % <-- End of 'if strcmp( lower(computer), 'pcwin' )'

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005