Compare Revisions

File I/O

Change Revisions

Revision 39504:

Revision 39504 by rash on

Revision 39505:

Revision 39505 by 21 on

Title:
File I/O
File I/O
Slug:
Code_snippets/File_I//O
Code_snippets/File_I_O
Tags:
Extensions, Add-ons, Files, Streams, "Code snippets"
Extensions, Add-ons, Files, Streams, "Code snippets"
Content:

Revision 39504
Revision 39505
n16    <h3 name="Available_libraries">n16    <h3 id="Available_libraries" name="Available_libraries">
n22    <h3 name="Creating_a_file_object_.28.22opening.22_files.29">n22    <h3 id="Creating_a_file_object_.28.22opening.22_files.29" nam
 >e="Creating_a_file_object_.28.22opening.22_files.29">
n36    <h3 name="Getting_special_files">n36    <h3 id="Getting_special_files" name="Getting_special_files">
n203    <h4>n203    <h4 id="Getting_the_users'_home_directory">
n212    <h4>n212    <h4 id="Enumerating_drives_on_Windows">
n228    <h3 name="Creating_Folders">n228    <h3 id="Creating_Folders" name="Creating_Folders">
n246    <h3 name="Creating_temporary_files">n246    <h3 id="Creating_temporary_files" name="Creating_temporary_fi
 >les">
n261    <h3 name="User_input_via_nsIFilePicker">n261    <h3 id="User_input_via_nsIFilePicker" name="User_input_via_ns
 >IFilePicker">
n267    <h3 name="nsIFile_and_path_strings">n267    <h3 id="nsIFile_and_path_strings" name="nsIFile_and_path_stri
 >ngs">
n292      To load from <em>file://</em>, <em>http://</em>, <em>chromen292      To load from <em>file://</em>, <em>http://</em>, <em>chrome
>://</em>, <em>resource://</em> and other URLs directly, use <a hr>://</em>, <em>resource://</em> and other URLs directly, use <a hr
>ef="/en/XMLHttpRequest" title="en/XMLHttpRequest">XMLHttpRequest<>ef="/en/DOM/XMLHttpRequest" title="en/XMLHttpRequest">XMLHttpRequ
>/a> or {{ interface("nsIChannel") }} (<a class="external" href="h>est</a> or {{ interface("nsIChannel") }} (<a class="external" hre
>ttp://forums.mozillazine.org/viewtopic.php?p=921150#921150">examp>f="http://forums.mozillazine.org/viewtopic.php?p=921150#921150">e
>le</a>).>xample</a>).
n297    <h3 name="Storing_nsILocalFile_in_preferences">n297    <h3 id="Storing_nsILocalFile_in_preferences" name="Storing_ns
 >ILocalFile_in_preferences">
n303    <h4 name="Absolute_path_.28nsILocalFile.29">n303    <h4 id="Absolute_path_.28nsILocalFile.29" name="Absolute_path
 >_.28nsILocalFile.29">
n320    <h4 name="Relative_path_.28nsIRelativeFilePref.29">n320    <h4 id="Relative_path_.28nsIRelativeFilePref.29" name="Relati
 >ve_path_.28nsIRelativeFilePref.29">
n340    <h3 name="Navigating_with_nsIFile">n340    <h3 id="Navigating_with_nsIFile" name="Navigating_with_nsIFil
 >e">
n343    <h4 name="Get_a_file_in_given_directory">n343    <h4 id="Get_a_file_in_given_directory" name="Get_a_file_in_gi
 >ven_directory">
n352    <h4 name="Enumerating_files_in_given_directory">n352    <h4 id="Enumerating_files_in_given_directory" name="Enumerati
 >ng_files_in_given_directory">
n369    <h3 name="Reading_from_a_file">n369    <h3 id="Reading_from_a_file" name="Reading_from_a_file">
n372    <h4 name="Asynchronously">n372    <h4 id="Asynchronously" name="Asynchronously">
n392    <h4>n392    <h4 id="Read_with_content_type_hint">
n409    <h3 name="Writing_to_a_file">n409    <h3 id="Writing_to_a_file" name="Writing_to_a_file">
n412    <h4>n412    <h4 id="Write_a_string">
n443    <h4 name="Copy_a_stream_to_a_file">n443    <h4 id="Copy_a_stream_to_a_file" name="Copy_a_stream_to_a_fil
 >e">
n456    <h3 name="More">n456    <h3 id="More" name="More">
n462    <h4 name="Synchronously">n462    <h4 id="Synchronously" name="Synchronously">
n486    <h4 name="Line_by_line">n486    <h4 id="Line_by_line" name="Line_by_line">
n514    <h4 name="Binary_File">n514    <h4 id="Binary_File" name="Binary_File">
n542    <h4>n542    <h4 id="Writing_a_File">
n560// also call foStream.writeData directlyn560// also call foStream.write(data, data.length) directly
n570    <h4 name="Writing_a_Binary_File">n570    <h4 id="Writing_a_Binary_File" name="Writing_a_Binary_File">
t598    <h3 name="More">t598    <h3 id="More" name="More">

Back to History