[導(dǎo)入]目錄文件的操作

          Posted on 2006-01-11 14:40 yoyozy 閱讀(159) 評論(0)  編輯  收藏

          目錄文件的操作

          目錄文件的操作也是除了數(shù)據(jù)庫操作以外,經(jīng)常需要操作的一個數(shù)據(jù)對象.

          移動文件,相當(dāng)于linux 中mv命令,但與平臺無關(guān):

          /**
          * This class moves an input file to output file
          *
          * @param String input file to move from
          * @param String output file
          *
          */
          public static void move (String input, String output){
            File inputFile = new File(input);
            File outputFile = new File(output);
            inputFile.renameTo(outputFile);
          }

          <
          文章來源:http://blog.donews.com/yoyozy/archive/2005/11/02/611867.aspx

          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導(dǎo)航:
           

          posts - 15, comments - 0, trackbacks - 0, articles - 1

          Copyright © yoyozy

          主站蜘蛛池模板: 翁源县| 宁晋县| 台东县| 呼玛县| 江北区| 包头市| 洛隆县| 怀柔区| 博乐市| 华容县| 萨嘎县| 广南县| 清水县| 吉隆县| 兴业县| 绥德县| 峨眉山市| 固安县| 大名县| 日土县| 西平县| 遂昌县| 娄烦县| 商城县| 闸北区| 社会| 陆河县| 绥化市| 南充市| 博野县| 大方县| 莫力| 固镇县| 若尔盖县| 泸州市| 平塘县| 荃湾区| 临汾市| 肇庆市| 延边| 井陉县|