MACROMEDIA FLASH MEDIA SERVER 2-SERVER MANAGEMENT ACTIONSCRIPT LANGUAGE Manuale Utente Pagina 51

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 155
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 50
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
48
File.canWrite
fileObject.canWrite
Read only; a boolean value indicating whether a file can be written to (true) or not (false).
Note: If
File.open() was called to open the file, the mode in which the file was opened is respected. For example, if the
file was opened in read mode, you can read from the file, but you cannot write to the file.
Availability
Flash Media Server 2
File.close()
fileObject.close()
Closes the file. This method is called automatically on an open File object when the object is out of scope.
Availability
Flash Media Server 2
Returns
A boolean value indicating whether the file was closed successfully (
true) or not (false). Returns false if the file
is not open.
Example
The following code closes the /path/file.txt file:
if (x.open("/path/file.txt", "read") ){
// Do something here.
x.close();
}
File.copyTo()
fileObject.copyTo(name)
Copies a file to a different location or copies it to the same location with a different filename. This method returns
false if the source file doesn't exist or if the source file is a directory. When this method fails, it invokes the appli-
cation.onStatus()
event handler to report errors.
Note: The user or process owner that the server runs under in the operating system must have adequate write permis-
sions or the call can fail.
Availability
Flash Media Server 2
Parameters
name Specifies the name of the destination file. The name can contain only UTF-8 characters; high byte values can
be encoded by using the URI character-encoding scheme. The name specified is mapped to a system path by using
the mappings specified in the Application.xml file. If the path is invalid or if the destination file doesn’t exist, the
operation fails, and the method returns
false.
Returns
A boolean value indicating whether the file is copied successfully (
true) or not (false).
Vedere la pagina 50
1 2 ... 46 47 48 49 50 51 52 53 54 55 56 ... 154 155

Commenti su questo manuale

Nessun commento