slawek Thu Feb 7 17:49:21 2002 EDT
Modified files:
/phpdoc/pl/functions filesystem.xml
Log:
Updated to EN 1.115
Index: phpdoc/pl/functions/filesystem.xml
diff -u phpdoc/pl/functions/filesystem.xml:1.10 phpdoc/pl/functions/filesystem.xml:1.11
--- phpdoc/pl/functions/filesystem.xml:1.10 Sat Feb 2 10:48:28 2002
+++ phpdoc/pl/functions/filesystem.xml Thu Feb 7 17:49:20 2002
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-2"?>
-<!-- EN-Revision: 1.91 Maintainer: adi Status: partial -->
-<!-- $Revision: 1.10 $ -->
+<!-- EN-Revision: 1.115 Maintainer: adi Status: partial -->
+<!-- $Revision: 1.11 $ -->
<reference id="ref.filesystem">
<title>System plik�w</title>
<titleabbrev>System plik�w</titleabbrev>
@@ -34,11 +34,11 @@
<example>
<title><function>basename</function> przyk�ad</title>
<programlisting role="php">
-+<![CDATA[
+<![CDATA[
$path = "/home/httpd/html/index.php";
$file = basename ($path); // $file zawiera "index.php"
$file = basename ($path,".php"); // $file zawiera "index"
-+]]>
+]]>
</programlisting>
</example>
</para>
@@ -66,11 +66,10 @@
<methodparam><type>mixed</type><parameter>grupa</parameter></methodparam>
</methodsynopsis>
<para>
- Dokonuje zmiany grupy pliku podanego w parametrze
- <parameter>nazwa_pliku</parameter> na wybran� parametrem
- <parameter>grupa</parameter>. Tylko super u�ytkownik mo�e zmieni�
- dowolnie grup� pliku; inni u�ytkownicy mog� zmieni� grup� pliku
- na dowoln� grup�, kt�rej cz�onkiem jest ten u�ytkownik.
+ Dokonuje zmiany grupy pliku podanego w parametrze
+<parameter>nazwa_pliku</parameter>
+ na wybran� parametrem <parameter>grupa</parameter> (okre�lon� przez nazw� lub
+numer).
+ Tylko super u�ytkownik mo�e zmieni� dowolnie grup� pliku; inni u�ytkownicy mog�
+ zmieni� grup� pliku na dowoln� grup�, kt�rej cz�onkiem jest ten u�ytkownik.
</para>
<para>
Zwraca &true; gdy sukces; w przeciwnym wypadku zwraca &false;.
@@ -79,11 +78,7 @@
Patrz tak�e <function>chown</function> i
<function>chmod</function>.
</para>
- <note>
- <simpara>
- Ta funkcja nie dzia�a w systemach Windows
- </simpara>
- </note>
+ ¬e.no-windows;
</refsect1>
</refentry>
@@ -127,11 +122,7 @@
Patrz tak�e <function>chown</function> i
<function>chgrp</function>.
</para>
- <note>
- <simpara>
- Ta funkcja nie dzia�a w systemach Windows
- </simpara>
- </note>
+ ¬e.no-windows;
</refsect1>
</refentry>
@@ -149,7 +140,7 @@
</methodsynopsis>
<para>
Dokonuje zmiany w�a�ciciela pliku nazwa_pliku na u�ytkownika
- podanego w parametrze u�ytkownik.
+ podanego w parametrze u�ytkownik (okre�lonego przez nazw� lub numer).
Tylko super u�ytkownik mo�e zmieni� w�a�ciciela pliku.
</para>
<para>
@@ -159,11 +150,7 @@
Patrz tak�e <function>chown</function> i
<function>chmod</function>.
</para>
- <note>
- <simpara>
- Ta funkcja nie dzia�a w systemach Windows
- </simpara>
- </note>
+ ¬e.no-windows;
</refsect1>
</refentry>
@@ -240,8 +227,16 @@
</programlisting>
</example>
</para>
+ <warning>
+ <para>
+ Je�li docelowy plik istnieje to zostanie nadpisany.
+ </para>
+ </warning>
<para>
- Patrz tak�e: <function>rename</function>.
+ Patrz tak�e: <function>move_uploaded_file</function>,
+ <function>rename</function>, i cz�� podr�cznika dotycz�ca
+ <link linkend="features.file-upload">obs�ugi uploadowanych plik�w</link>.
+
</para>
</refsect1>
</refentry>
@@ -563,14 +558,15 @@
<methodsynopsis>
<type>string</type><methodname>fgets</methodname>
<methodparam><type>int</type><parameter>fp</parameter></methodparam>
- <methodparam><type>int</type><parameter>d�ugo��</parameter></methodparam>
- </methodsynopsis>
+ <methodparam
+choice="opt"><type>int</type><parameter>d�ugo��</parameter></methodparam>
+ </methodsynopsis>
<para>
Zwraca �a�cuch o d�ugo�ci - 1 bajt�w odczytany z pliku wskazanego
przez fp. Czytanie ko�czy si� kiedy przeczytano d�ugo�� - 1 bajt�w
lub gdy wyst�pi znak nowej linii (jest on do��czany do zwracanego
wyniku) lub gdy wyst�pi znak ko�ca pliku EOF (kt�rykolwiek
- przypadek zdarzy si� pierwszy).
+ przypadek zdarzy si� pierwszy). Je�li nie zosta�a okre�lona d�ugo��,
+ domy�lnie przyjmuje 1k (1024 bajty).
</para>
<para>
W przypadku b��du, zwraca &false;.
@@ -671,6 +667,12 @@
element tablicy odpowiada linii w pliku. Elementy tablicy zawieraj�
znak nowej linii.
</para>
+ <note>
+ <para>
+ Ka�da linia w wynikowej tabeli zawiera znak nowej lini, je�li chcesz
+ si� ich pozby� to musisz u�y� <function>trim</function>.
+ </para>
+ </note>
<para>
Mo�esz u�y� opcjonalnego 2 parametru i ustawi� go na "1", je�li
chcesz szuka� pliku tak�e w
@@ -682,18 +684,20 @@
<![CDATA[
<?php
// pobiera stron� WWW do tablicy i wy�wietla j�
-$fcontents = file ('http://www.php.net');
+$fcontents = file ('http://www.php.net/');
while (list ($line_num, $line) = each ($fcontents)) {
- echo "<b>Linia $line_num:</b>; " . htmlspecialchars ($line) . "<br>\n";
+ echo "<b>Linia $line_num:</b>; ", htmlspecialchars ($line), "<br>\n";
}
// pobiera stron� WWW i zapisuje do �a�cucha
-$fcontents = join ('', file ('http://www.php.net'));
+$fcontents = join ('', file ('http://www.php.net/'));
?>
]]>
</programlisting>
</informalexample>
</para>
+ ¬e.not-bin-safe;
+ &tip.fopen-wrapper;
<para>
Patrz tak�e <function>readfile</function>,
<function>fopen</function>, <function>fsockopen</function> i
@@ -830,16 +834,12 @@
Wyniki tej funkcji s� cachowane. Zobacz
<function>clearstatcache</function> aby uzyska� wi�cej szczeg��w.
</para>
- <note>
- <simpara>
- Ta funkcja nie dzia�a w systemach Windows.
- </simpara>
+ ¬e.no-windows;
<simpara>
Ta funkcja nie dzia�a
<link linkend="features.remote-files">na zdalnych plikach</link>; sprawdzany
plik musi by� dost�pny przez system plik�w serwera.
</simpara>
- </note>
</refsect1>
</refentry>
@@ -866,11 +866,7 @@
<link linkend="features.remote-files">na zdalnych plikach</link>; sprawdzany
plik musi by� dost�pny przez system plik�w serwera.
</simpara>
- <note>
- <simpara>
- Ta funkcja nie dzia�a w systemach Windows
- </simpara>
- </note>
+ ¬e.no-windows;
</refsect1>
</refentry>
@@ -932,11 +928,7 @@
<link linkend="features.remote-files">na zdalnych plikach</link>; sprawdzany
plik musi by� dost�pny przez system plik�w serwera.
</simpara>
- <note>
- <simpara>
- Ta funkcja nie dzia�a w systemach Windows.
- </simpara>
- </note>
+ ¬e.no-windows;
</refsect1>
</refentry>
@@ -978,7 +970,7 @@
<methodparam><type>string</type><parameter>nazwa_pliku</parameter></methodparam>
</methodsynopsis>
<para>
- Zwraca rozmiar pliku, lub &false; w przypadku b��du.
+ Zwraca rozmiar pliku w bajtach, lub &false; w przypadku b��du.
</para>
<para>
Wyniki tej funkcji s� cachowane. Zobacz
@@ -1081,7 +1073,7 @@
<simpara>
<function>flock</function> allows you to perform a simple
reader/writer model which can be used on virtually every platform
- (including most Unices and even Windows). The optional 3rd
+ (including most Unix derivatives and even Windows). The optional third
argument is set to &true; if the lock would block (EWOULDBLOCK
errno condition)
</simpara>
@@ -1089,13 +1081,26 @@
<function>flock</function> returns &true; on success and &false; on
error (e.g. when a lock could not be acquired).
</simpara>
+ <note>
+ <para>
+ Because <function>flock</function> requires a file pointer, you may have
+ to use a special lock file to protect access to a file that you intend
+ to truncate by opening it in write mode (with a "w" or "w+" argument to
+ <function>fopen</function>).
+ </para>
+ </note>
<warning>
<para>
- On most operation systems <function>flock</function> is implemented
- at the process level. When using a multithreaded server API like
- ISAPI you cannot rely on <function>flock</function> to protect
- files against other PHP scripts running in parallel threads of the
- same server instance!
+ <function>flock</function> will not work on NFS and many other networked
+ file systems. Check your operating system documentation for more
+ details.
+ </para>
+ <para>
+ On some operating systems <function>flock</function> is implemented at
+ the process level. When using a multithreaded server API like ISAPI you
+ may not be able to rely on <function>flock</function> to protect files
+ against other PHP scripts running in parallel threads of the same server
+ instance!
</para>
</warning>
</refsect1>
@@ -1266,25 +1271,35 @@
<methodparam><type>int</type><parameter>fp</parameter></methodparam>
</methodsynopsis>
<simpara>
- Reads to EOF on the given file pointer and writes the results to
- standard output.
+ Reads to EOF on the given file pointer from the current position and
+ writes the results to standard output.
</simpara>
<simpara>
If an error occurs, <function>fpassthru</function> returns
&false;.
</simpara>
<simpara>
- The file pointer must be valid, and must point to a file
- successfully opened by <function>fopen</function>,
- <function>popen</function>, or <function>fsockopen</function>.
- The file is closed when <function>fpassthru</function> is done
- reading it (leaving <parameter>fp</parameter> useless).
+ The file pointer must be valid, and must point to a file successfully
+ opened by <function>fopen</function>, <function>popen</function>, or
+ <function>fsockopen</function>. You may need to call
+ <function>rewind</function> to reset the file pointer to the beginning of
+ the file if you have already written data to the file. The file is
+ closed when <function>fpassthru</function> is done reading it (leaving
+ <parameter>fp</parameter> useless).
</simpara>
<simpara>
If you just want to dump the contents of a file to stdout you may
want to use the <function>readfile</function>, which saves you
the <function>fopen</function> call.
</simpara>
+ <note>
+ <para>
+ When using <function>fpassthru</function> on a binary file on Windows
+ systems, you should make sure to open the file in binary mode by
+ appending a <literal>b</literal> to the mode used in the call to
+ <function>fopen</function>.
+ </para>
+ </note>
<simpara>
See also <function>readfile</function>,
<function>fopen</function>, <function>popen</function>, and
@@ -1460,8 +1475,10 @@
Set position to current location plus
<parameter>offset</parameter>.</member> <member>SEEK_END - Set
position to end-of-file plus
- <parameter>offset</parameter>.</member>
- </simplelist>
+ <parameter>offset</parameter>. (To move to a position before the
+ end-of-file, you need to pass a negative value in
+ <parameter>offset</parameter>.)</member>
+ </simplelist>
</para>
<para>If <parameter>whence is not specified, it is assumed to be
SEEK_SET.</parameter>
@@ -1792,19 +1809,15 @@
<function>clearstatcache</function> aby uzyska� wi�cej szczeg��w.
</para>
<para>
- Patrz tak�e <function>is_dir</function> i
- <function>is_file</function>.
+ Patrz tak�e <function>is_dir</function>,
+ <function>is_file</function> i <function>readlink</function>.
</para>
<simpara>
Ta funkcja nie dzia�a
<link linkend="features.remote-files">na zdalnych plikach</link>; sprawdzany
plik musi by� dost�pny przez system plik�w serwera.
</simpara>
- <note>
- <simpara>
- Ta funkcja nie dzia�a w systemach Windows.
- </simpara>
- </note>
+ ¬e.no-windows;
</refsect1>
</refentry>
@@ -1957,11 +1970,7 @@
and <function>readlink</function> along with
<function>linkinfo</function>.
</para>
- <note>
- <simpara>
- This function does not work on Windows systems
- </simpara>
- </note>
+ ¬e.no-windows;
</refsect1>
</refentry>
@@ -1988,11 +1997,7 @@
See also <function>symlink</function>, <function>link</function>,
and <function>readlink</function>.
</para>
- <note>
- <simpara>
- This function does not work on Windows systems
- </simpara>
- </note>
+ ¬e.no-windows;
</refsect1>
</refentry>
@@ -2047,11 +2052,6 @@
</methodsynopsis>
<para>
- This function is available only in versions of PHP 3 after PHP
- 3.0.16, and in versions of PHP 4 after 4.0.2.
- </para>
-
- <para>
This function checks to ensure that the file designated by
<parameter>filename</parameter> is a valid upload file (meaning
that it was uploaded via PHP's HTTP POST upload mechanism). If
@@ -2082,6 +2082,12 @@
¬e.sm.uidcheck;
+ <warning>
+ <para>
+ If the destination file already exists, it will be overwritten.
+ </para>
+ </warning>
+
<para>
See also <function>is_uploaded_file</function>, and the section
<link linkend="features.file-upload">Handling file uploads</link>
@@ -2396,15 +2402,11 @@
in case of error.
</para>
<para>
- See also <function>symlink</function>,
- <function>readlink</function> and
+ See also <function>is_link</function>,
+ <function>symlink</function> and
<function>linkinfo</function>.
</para>
- <note>
- <simpara>
- This function does not work on Windows systems
- </simpara>
- </note>
+ ¬e.no-windows;
</refsect1>
</refentry>
@@ -2447,6 +2449,12 @@
<para> The file pointer must be valid, and must point to a file
successfully opened by <function>fopen</function>.
</para>
+ <note>
+ <para>
+ If you have opened the file in append ("a") mode, any data you write
+ to the file will always be appended, regardless of the file position.
+ </para>
+ </note>
<para>
See also <function>fseek</function> and
<function>ftell</function>.
@@ -2629,11 +2637,7 @@
and <function>readlink</function> along with
<function>linkinfo</function>.
</para>
- <note>
- <simpara>
- This function does not work on Windows systems.
- </simpara>
- </note>
+ ¬e.no-windows;
</refsect1>
</refentry>
@@ -2701,81 +2705,80 @@
</refsect1>
</refentry>
- <refentry id="function.tmpfile">
+ <refentry id="function.tmpfile">
<refnamediv>
<refname>tmpfile</refname>
- <refpurpose>Creates a temporary file</refpurpose>
+ <refpurpose>Tworzy plik tymczasowy</refpurpose>
</refnamediv>
<refsect1>
- <title>Description</title>
+ <title>Opis</title>
<methodsynopsis>
<type>int</type><methodname>tmpfile</methodname>
<void/>
</methodsynopsis>
<para>
- Creates a temporary file with an unique name in write mode,
- returning a file handle similar to the one returned by
+ Tworzy plik tymczasowy o unikalnej nazwie i otwiera go
+ w trybie d zapisu, zwraca uchwyt pliku, podobnie jak
<function>fopen</function>.
- The file is automatically removed when closed (using
- <function>fclose</function>), or when the script ends.
+ Plik jest automatycznie kasowany przy zamykaniu (po u�yciu
+ <function>fclose</function>), lub gdy skrypt si� zako�czy.
</para>
<para>
- For details, consult your system documentation on the
- <literal>tmpfile(3)</literal> function, as well as the
- <filename>stdio.h</filename> header file.
+ Je�li chcesz uzyska� wi�cej szczeg��w, zajrzyj do dokumentacji
+ twojego systemu dotycz�cej funkcji <literal>tmpfile(3)</literal>,
+ albo do pliku nag��wkowego <filename>stdio.h</filename>.
</para>
<para>
<example>
- <title><function>tmpfile</function> example</title>
+ <title><function>tmpfile</function> przyk�ad</title>
<programlisting role="php">
<![CDATA[
$temp = tmpfile();
-fwrite($temp, "writing to tempfile");
-fclose($temp); // this removes the file
+fwrite($temp, "zapisywanie do pliku tymczasowego");
+fclose($temp); // to kasuje plik
]]>
</programlisting>
</example>
</para>
<para>
- See also <function>tempnam</function>.
+ Patrz tak�e <function>tempnam</function>.
</para>
</refsect1>
</refentry>
-
- <refentry id="function.touch">
+ <refentry id="function.touch">
<refnamediv>
<refname>touch</refname>
- <refpurpose>Sets modification time of file</refpurpose>
+ <refpurpose>Ustawia czas modyfikacji pliku</refpurpose>
</refnamediv>
<refsect1>
- <title>Description</title>
+ <title>Opis</title>
<methodsynopsis>
<type>int</type><methodname>touch</methodname>
- <methodparam><type>string</type><parameter>filename</parameter></methodparam>
+ <methodparam><type>string</type><parameter>nazwa_pliku</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>
- time
+ czas
</parameter></methodparam>
</methodsynopsis>
<para>
- Attempts to set the modification time of the file named by
- filename to the value given by time. If the option time is not
- given, uses the present time.
+ Pr�buje ustawi� czas modyfikacji pliku o nazwie nazwa_pliku
+ na warto�� podan� przez czas. Je�li opcja czas nie jest
+ podana, u�ywa czasu bie��cego.
</para>
<para>
- If the file does not exist, it is created.
+ Je�li plik nie istnieje, to zostanie utworzony.
</para>
<para>
- Returns &true; on success and &false; otherwise.
+ Zwraca &true; gdy sukces i &false; w przeciwnym wypadku.
<example>
- <title><function>touch</function> example</title>
+ <title><function>touch</function> przyk�ad</title>
<programlisting role="php">
<![CDATA[
if (touch ($FileName)) {
- print "$FileName modification time has been
- changed to todays date and time";
+ print "$FileName czas modyfikacji zosta�
+ zmieniony na obecn� date i czas";
} else {
- print "Sorry Could Not change modification time of $FileName";
+ print "Przykro mi ale Nie Mog� zmieni� czasu modyfikacji pliku $FileName";
}
]]>
</programlisting>
@@ -2804,40 +2807,31 @@
<function>umask</function> without arguments simply returns the
current umask.
</para>
- <note>
- <simpara>
- This function may not work on Windows systems.
- </simpara>
- </note>
+ ¬e.no-windows;
</refsect1>
</refentry>
- <refentry id="function.unlink">
+<refentry id="function.unlink">
<refnamediv>
<refname>unlink</refname>
- <refpurpose>Deletes a file</refpurpose>
+ <refpurpose>Kasowanie pliku</refpurpose>
</refnamediv>
<refsect1>
- <title>Description</title>
+ <title>Opis</title>
<methodsynopsis>
<type>int</type><methodname>unlink</methodname>
- <methodparam><type>string</type><parameter>filename</parameter></methodparam>
+ <methodparam><type>string</type><parameter>nazwa_pliku</parameter></methodparam>
</methodsynopsis>
<para>
- Deletes <parameter>filename</parameter>. Similar to the Unix C
- unlink() function.
+ Kasuje <parameter>nazwa_pliku</parameter>. Podobnie do funkcji unlink()
+ z Unix'owego C.
</para>
<para>
- Returns 0 or &false; on an error.
+ &return.success;
</para>
<para>
- See also <function>rmdir</function> for removing directories.
+ Patrz tak�e <function>rmdir</function> do kasowania katalog�w.
</para>
- <note>
- <simpara>
- This function may not work on Windows systems.
- </simpara>
- </note>
</refsect1>
</refentry>
@@ -2852,6 +2846,7 @@
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
+indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil