Flex檔案操作相關

2021-08-02 13:16:14 字數 598 閱讀 6714

目錄

表示每個已安裝的 air 應用程式獨有的儲存目錄

安裝應用程式的唯讀目錄(其中包括所有已安裝的資源)

file.desktopdirectory

使用者的桌面目錄

file.documentsdirectory

使用者的文件目錄

file.userdirectory

使用者目錄

觀察以下**的輸出

var docs:

file = file.documentsdirectory;

trace(docs.nativepath); //

c:\documents

andsettings\turing\my

documents

trace(docs.url); //

file:///

c:/documents%

20and%20settings/turing/my%20documents

extension 屬性

resolvepath () 方法

這個方法通常採用相對路徑(不是url,也非絕對路徑)做引數,得到相對於已知檔案的路徑。

檔案操作相關

檔案拷貝ssize t sendfile int out fd,int in fd,off t offset,size t count sendfile 是作用於資料拷貝在兩個檔案描述符之間的操作函式.這個拷貝操作是核心中操作的,所以稱為 零拷貝 sendfile函式比起read和write函式高效...

檔案相關操作

file open wenjian mode r encoding utf 8 content file.read print content file.close file open wenjian mode w encoding utf 8 content file.write 楊子列 file...

flex操作外部xml檔案

xml檔案 兩種方法 1,httpservice方法 bindable var mydata arraycollection new arraycollection private function init void private function resulthandler event res...