Added license, updated functions

This commit is contained in:
zone 2001-06-23 08:30:14 +00:00
parent 69a3c36c70
commit c13d02ac2e
11 changed files with 824 additions and 596 deletions

View File

@ -67,7 +67,7 @@ $phpgw->vfs->mkdir ("dir");
</P> </P>
<P>As far as the actual paths are concerned, users and groups are the same. <P>As far as the actual paths are concerned, users and groups are the same.
The VFS has no built in ACL support, so /home/username works the same as /home/groupname. The VFS has no built in ACL support, so /home/username works the same as /home/groupname.
See the note on AC L support in the Notes section.</P> See the note on ACL support in the Notes section.</P>
<P> <P>
<UL> <UL>
<LI>You should never have to know the real path of files</LI> <LI>You should never have to know the real path of files</LI>

View File

@ -73,19 +73,15 @@ VFS, note that <EM>getabsolutepath () is depreciated</EM>. getabsolutepath () st
exists (albeit in a much different form), and is responsible for some of the exists (albeit in a much different form), and is responsible for some of the
path translation, but it is an <EM>internal</EM> function only. Applications should path translation, but it is an <EM>internal</EM> function only. Applications should
only use path_parts (). We have shown you how to use path_parts () so you can only use path_parts (). We have shown you how to use path_parts () so you can
experiment with it using different paths and relativities as we relativity experiment with it using different paths and relativities as we explore relativity.</P>
in Section
<A HREF="vfs-4.html#sec:relativity"></A>.</P>
<H2><A NAME="sec:cd"></A> <A NAME="ss3.2">3.2</A> <A HREF="vfs.html#toc3.2">cd ()</A> <H2><A NAME="sec:cd"></A> <A NAME="ss3.2">3.2</A> <A HREF="vfs.html#toc3.2">cd ()</A>
</H2> </H2>
<P>Ok, one more thing before we discuss relativity, and that is the cd () <P>Part of the overall goal for the VFS in phpGroupWare is to give the user
function. Part of the overall goal for the VFS in phpGroupWare is to give the a seamless experience during their session. For example, if they upload a file
user a seamless experience during their session. For example, if they upload using a file manager to /home/my_group/project1, and then go to download an
a file using a file manager to /home/my_group/project1, and then go to download email attachment, the default directory will be /home/my_group/project1. This
an email attachment, the default directory will be /home/my_group/project1. is accomplished using the cd () function. The prototype and examples: </P>
This is accomplished using the cd () function. The prototype and examples:</P>
<P> <P>
<PRE> <PRE>
function cd ($target = &quot;/&quot;, $relative = True, $relatives = array (RELATIVE_CURRENT)) function cd ($target = &quot;/&quot;, $relative = True, $relatives = array (RELATIVE_CURRENT))

View File

@ -15,9 +15,9 @@
<H2><A NAME="sec:relativity"></A> <A NAME="s4">4.</A> <A HREF="vfs.html#toc4">Relativity</A></H2> <H2><A NAME="sec:relativity"></A> <A NAME="s4">4.</A> <A HREF="vfs.html#toc4">Relativity</A></H2>
<P>Ok, just one last thing before we get into relativity. You will notice <P>Ok, just one last thing before we get into relativity. You will notice
throughout the examples the use of $fakebase. $fakebase is by throughout the examples the use of $fakebase. $phpgw-&gt;vfs&gt;fakebase
default "/home". The old VFS was hard-coded to use "/home", but the naming choice is by default "/home". The old VFS was hard-coded to use "/home", but the naming
for this is now up to administrators. See the "Notes -&gt; Fakebase directory" choice for this is now up to administrators. See the "Notes - Fakebase directory"
section for more information. Throughout the rest of this document, you will section for more information. Throughout the rest of this document, you will
see $fakebase used in calls to the VFS, and /home used in actual paths. see $fakebase used in calls to the VFS, and /home used in actual paths.
<EM>You should always use $fakebase when making applications. </EM>I suggest <EM>You should always use $fakebase when making applications. </EM>I suggest
@ -75,7 +75,7 @@ directory. So the actual file system call might look like this (keep in mind
that $randomdir and $randomfile are just random strings):</P> that $randomdir and $randomfile are just random strings):</P>
<P> <P>
<PRE> <PRE>
rename ("/var/www/phpgroupware/tmp/0ak5adftgh7/jX42sC9M", "/var/www/phpgroupware/files/home/users/jason/attachments/actual_name.ext"); rename ("/var/www/phpgroupware/tmp/0ak5adftgh7/jX42sC9M", "/var/www/phpgroupware/files/home/jason/attachments/actual_name.ext");
</PRE> </PRE>
</P> </P>
<P>Of course you don't have to know that, nor should you be concerned with <P>Of course you don't have to know that, nor should you be concerned with

View File

@ -3,11 +3,12 @@
<HEAD> <HEAD>
<META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.7.4"> <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.7.4">
<TITLE>phpgwapi - VFS Class: Notes</TITLE> <TITLE>phpgwapi - VFS Class: Notes</TITLE>
<LINK HREF="vfs-7.html" REL=next>
<LINK HREF="vfs-5.html" REL=previous> <LINK HREF="vfs-5.html" REL=previous>
<LINK HREF="vfs.html#toc6" REL=contents> <LINK HREF="vfs.html#toc6" REL=contents>
</HEAD> </HEAD>
<BODY> <BODY>
Next <A HREF="vfs-7.html">Next</A>
<A HREF="vfs-5.html">Previous</A> <A HREF="vfs-5.html">Previous</A>
<A HREF="vfs.html#toc6">Contents</A> <A HREF="vfs.html#toc6">Contents</A>
<HR> <HR>
@ -123,7 +124,7 @@ that /home is not absolute, and use $phpgw-&gt;vfs-&gt;fakebase instead</EM>.
I suggest setting $fakebase = $phpgw-&gt;vfs-&gt;fakebase; right I suggest setting $fakebase = $phpgw-&gt;vfs-&gt;fakebase; right
off the bat to keep things neater.</P> off the bat to keep things neater.</P>
<HR> <HR>
Next <A HREF="vfs-7.html">Next</A>
<A HREF="vfs-5.html">Previous</A> <A HREF="vfs-5.html">Previous</A>
<A HREF="vfs.html#toc6">Contents</A> <A HREF="vfs.html#toc6">Contents</A>
</BODY> </BODY>

View File

@ -0,0 +1,41 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.7.4">
<TITLE>phpgwapi - VFS Class: About this Document</TITLE>
<LINK HREF="vfs-6.html" REL=previous>
<LINK HREF="vfs.html#toc7" REL=contents>
</HEAD>
<BODY>
Next
<A HREF="vfs-6.html">Previous</A>
<A HREF="vfs.html#toc7">Contents</A>
<HR>
<H2><A NAME="s7">7.</A> <A HREF="vfs.html#toc7">About this Document</A></H2>
<H2><A NAME="ss7.1">7.1</A> <A HREF="vfs.html#toc7.1">Copyright and License</A>
</H2>
<P>Copyright (c) 2001 Jason Wies</P>
<P>Permission is granted to copy, distribute and/or modify this document under
the terms of the GNU Free Documentation License, Version 1.1 or any later version
published by the Free Software Foundation; with no Invarient Sections, with
no Front-Cover Texts, and no Back-Cover Texts.</P>
<P>A copy of the license is available at
<A HREF="http://www.gnu.org/copyleft/fdl.html">http://www.gnu.org/copyleft/fdl.html</A>.</P>
<H2><A NAME="ss7.2">7.2</A> <A HREF="vfs.html#toc7.2">History</A>
</H2>
<P>Original document released in June 2001 by Jason Wies.</P>
<H2><A NAME="ss7.3">7.3</A> <A HREF="vfs.html#toc7.3">Contributing</A>
</H2>
<P>Contributions are always welcome. Please send to the current maintainer,
Jason Wies,
<A HREF="mailto:zone@users.sourceforge.net">zone@users.sourceforge.net</A>.</P>
<HR>
Next
<A HREF="vfs-6.html">Previous</A>
<A HREF="vfs.html#toc7">Contents</A>
</BODY>
</HTML>

View File

@ -86,6 +86,14 @@ Contents
<LI><A NAME="toc6.3">6.3</A> <A HREF="vfs-6.html#ss6.3">Function aliases</A> <LI><A NAME="toc6.3">6.3</A> <A HREF="vfs-6.html#ss6.3">Function aliases</A>
<LI><A NAME="toc6.4">6.4</A> <A HREF="vfs-6.html#ss6.4">Fakebase directory (changing /home)</A> <LI><A NAME="toc6.4">6.4</A> <A HREF="vfs-6.html#ss6.4">Fakebase directory (changing /home)</A>
</UL> </UL>
<P>
<H2><A NAME="toc7">7.</A> <A HREF="vfs-7.html">About this Document</A></H2>
<UL>
<LI><A NAME="toc7.1">7.1</A> <A HREF="vfs-7.html#ss7.1">Copyright and License</A>
<LI><A NAME="toc7.2">7.2</A> <A HREF="vfs-7.html#ss7.2">History</A>
<LI><A NAME="toc7.3">7.3</A> <A HREF="vfs-7.html#ss7.3">Contributing</A>
</UL>
<HR> <HR>
<A HREF="vfs-1.html">Next</A> <A HREF="vfs-1.html">Next</A>
Previous Previous

View File

@ -210,7 +210,7 @@ Users and groups and synonymous
As far as the actual paths are concerned, users and groups are the same. As far as the actual paths are concerned, users and groups are the same.
The VFS has no built in ACL support, so /home/username works the same as The VFS has no built in ACL support, so /home/username works the same as
/home/groupname. /home/groupname.
See the note on AC L support in the Notes section. See the note on ACL support in the Notes section.
\layout Itemize \layout Itemize
You should never have to know the real path of files You should never have to know the real path of files
@ -415,13 +415,7 @@ internal
function only. function only.
Applications should only use path_parts (). Applications should only use path_parts ().
We have shown you how to use path_parts () so you can experiment with it We have shown you how to use path_parts () so you can experiment with it
using different paths and relativities as we relativity in Section\SpecialChar ~ using different paths and relativities as we explore relativity.
\begin_inset LatexCommand \ref{sec:relativity}
\end_inset
.
\layout Subsection \layout Subsection
cd () cd ()
@ -432,8 +426,7 @@ cd ()
\layout Standard \layout Standard
Ok, one more thing before we discuss relativity, and that is the cd () function. Part of the overall goal for the VFS in phpGroupWare is to give the user
Part of the overall goal for the VFS in phpGroupWare is to give the user
a seamless experience during their session. a seamless experience during their session.
For example, if they upload a file using a file manager to /home/my_group/proje For example, if they upload a file using a file manager to /home/my_group/proje
ct1, and then go to download an email attachment, the default directory ct1, and then go to download an email attachment, the default directory
@ -496,7 +489,7 @@ Relativity
Ok, just one last thing before we get into relativity. Ok, just one last thing before we get into relativity.
You will notice throughout the examples the use of $fakebase. You will notice throughout the examples the use of $fakebase.
$fakebase is by default $phpgw->vfs>fakebase is by default
\begin_inset Quotes eld \begin_inset Quotes eld
\end_inset \end_inset
@ -518,7 +511,7 @@ Ok, just one last thing before we get into relativity.
\begin_inset Quotes eld \begin_inset Quotes eld
\end_inset \end_inset
Notes -> Fakebase directory Notes - Fakebase directory
\begin_inset Quotes erd \begin_inset Quotes erd
\end_inset \end_inset
@ -698,7 +691,7 @@ rename (
\begin_inset Quotes eld \begin_inset Quotes eld
\end_inset \end_inset
/var/www/phpgroupware/files/home/users/jason/attachments/actual_name.ext /var/www/phpgroupware/files/home/jason/attachments/actual_name.ext
\begin_inset Quotes erd \begin_inset Quotes erd
\end_inset \end_inset
@ -1930,4 +1923,45 @@ Application programmers need to recognize that /home is not absolute, and
. .
I suggest setting $fakebase = $phpgw->vfs->fakebase; right off the bat I suggest setting $fakebase = $phpgw->vfs->fakebase; right off the bat
to keep things neater. to keep things neater.
\layout Section
About this Document
\layout Subsection
Copyright and License
\layout Standard
Copyright (c) 2001 Jason Wies
\layout Standard
Permission is granted to copy, distribute and/or modify this document under
the terms of the GNU Free Documentation License, Version 1.1 or any later
version published by the Free Software Foundation; with no Invarient Sections,
with no Front-Cover Texts, and no Back-Cover Texts.
\layout Standard
A copy of the license is available at
\begin_inset LatexCommand \url[http://www.gnu.org/copyleft/fdl.html]{http://www.gnu.org/copyleft/fdl.html}
\end_inset
.
\layout Subsection
History
\layout Standard
Original document released in June 2001 by Jason Wies.
\layout Subsection
Contributing
\layout Standard
Contributions are always welcome.
Please send to the current maintainer, Jason Wies,
\begin_inset LatexCommand \url[zone@users.sourceforge.net]{mailto:zone@users.sourceforge.net}
\end_inset
.
\the_end \the_end

View File

@ -81,7 +81,7 @@ Users and groups and synonymous
</p><p> </p><p>
As far as the actual paths are concerned, users and groups are the same. As far as the actual paths are concerned, users and groups are the same.
The VFS has no built in ACL support, so /home/username works the same as /home/groupname. The VFS has no built in ACL support, so /home/username works the same as /home/groupname.
See the note on AC L support in the Notes section. See the note on ACL support in the Notes section.
</p> </p>
<p> <p>
<itemize> <itemize>
@ -196,19 +196,16 @@ As you can see, path_parts () is a very useful function and will save you
exists (albeit in a much different form), and is responsible for some of the exists (albeit in a much different form), and is responsible for some of the
path translation, but it is an <em>internal</em> function only. Applications should path translation, but it is an <em>internal</em> function only. Applications should
only use path_parts (). We have shown you how to use path_parts () so you can only use path_parts (). We have shown you how to use path_parts () so you can
experiment with it using different paths and relativities as we relativity experiment with it using different paths and relativities as we explore relativity.
in Section <ref id="sec:relativity" name="" >.
</p> </p>
<sect1> <sect1>
cd ()<label id="sec:cd" > cd ()<label id="sec:cd" >
<p> <p>
Ok, one more thing before we discuss relativity, and that is the cd () Part of the overall goal for the VFS in phpGroupWare is to give the user
function. Part of the overall goal for the VFS in phpGroupWare is to give the a seamless experience during their session. For example, if they upload a file
user a seamless experience during their session. For example, if they upload using a file manager to /home/my_group/project1, and then go to download an
a file using a file manager to /home/my_group/project1, and then go to download email attachment, the default directory will be /home/my_group/project1. This
an email attachment, the default directory will be /home/my_group/project1. is accomplished using the cd () function. The prototype and examples:
This is accomplished using the cd () function. The prototype and examples:
</p> </p>
<p> <p>
<verb> <verb>
@ -229,9 +226,9 @@ Now you're ready for relativity.
Relativity<label id="sec:relativity" > Relativity<label id="sec:relativity" >
<p> <p>
Ok, just one last thing before we get into relativity. You will notice Ok, just one last thing before we get into relativity. You will notice
throughout the examples the use of &dollar;fakebase. &dollar;fakebase is by throughout the examples the use of &dollar;fakebase. &dollar;phpgw-&gt;vfs&gt;fakebase
default "/home". The old VFS was hard-coded to use "/home", but the naming choice is by default "/home". The old VFS was hard-coded to use "/home", but the naming
for this is now up to administrators. See the "Notes -&gt; Fakebase directory" choice for this is now up to administrators. See the "Notes - Fakebase directory"
section for more information. Throughout the rest of this document, you will section for more information. Throughout the rest of this document, you will
see &dollar;fakebase used in calls to the VFS, and /home used in actual paths. see &dollar;fakebase used in calls to the VFS, and /home used in actual paths.
<em>You should always use &dollar;fakebase when making applications. </em>I suggest <em>You should always use &dollar;fakebase when making applications. </em>I suggest
@ -295,7 +292,7 @@ Those used to the old VFS will note that you do not have to translate the
</p> </p>
<p> <p>
<verb> <verb>
rename ("/var/www/phpgroupware/tmp/0ak5adftgh7/jX42sC9M", "/var/www/phpgroupware/files/home/users/jason/attachments/actual_name.ext"); rename ("/var/www/phpgroupware/tmp/0ak5adftgh7/jX42sC9M", "/var/www/phpgroupware/files/home/jason/attachments/actual_name.ext");
</verb> </verb>
</p><p> </p><p>
Of course you don't have to know that, nor should you be concerned with Of course you don't have to know that, nor should you be concerned with
@ -1143,6 +1140,33 @@ The old VFS was hard-coded to use &quot;/home&quot; as the fake base directory,
I suggest setting &dollar;fakebase = &dollar;phpgw-&gt;vfs-&gt;fakebase; right I suggest setting &dollar;fakebase = &dollar;phpgw-&gt;vfs-&gt;fakebase; right
off the bat to keep things neater. off the bat to keep things neater.
</p> </p>
<sect>
About this Document
<sect1>
Copyright and License
<p>
Copyright (c) 2001 Jason Wies
</p>
<p>
Permission is granted to copy, distribute and/or modify this document under
the terms of the GNU Free Documentation License, Version 1.1 or any later version
published by the Free Software Foundation; with no Invarient Sections, with
no Front-Cover Texts, and no Back-Cover Texts.
</p>
<p>
A copy of the license is available at <url url="http://www.gnu.org/copyleft/fdl.html" name="http://www.gnu.org/copyleft/fdl.html">.
</p>
<sect1>
History
<p>
Original document released in June 2001 by Jason Wies.
</p>
<sect1>
Contributing
<p>
Contributions are always welcome. Please send to the current maintainer,
Jason Wies, <url url="mailto:zone@users.sourceforge.net" name="zone@users.sourceforge.net">.
</p>
</article> </article>

File diff suppressed because it is too large Load Diff

View File

@ -23,7 +23,7 @@
\layout Title \layout Title
\added_space_top vfill \added_space_bottom vfill \added_space_top vfill \added_space_bottom vfill
VFS class functions phpgwapi - VFS class
\layout Author \layout Author
Jason Wies Jason Wies
@ -38,7 +38,7 @@ June 2001
\layout Section \layout Section
VFS class functions phpgwapi - VFS class
\layout Subsection \layout Subsection
class vfs class vfs

View File

@ -3,7 +3,7 @@
<!-- LyX 1.1 created this file. For more info see http://www.lyx.org/ --> <!-- LyX 1.1 created this file. For more info see http://www.lyx.org/ -->
<article> <article>
<title> <title>
VFS class functions phpgwapi - VFS class
</title> </title>
<author> <author>
Jason Wies Jason Wies
@ -15,7 +15,7 @@ June 2001
</abstract> </abstract>
<sect> <sect>
VFS class functions phpgwapi - VFS class
<sect1> <sect1>
class vfs<label id="sec: class vfs" > class vfs<label id="sec: class vfs" >
<p> <p>