<questionid="arch-what"> Whatisthisprojectgoodfor? <hint> Pleaseprovideherefewlinesdescribingthetheproject, whatproblemitshouldsolve,providelinkstodocumentation, specifications,etc. </hint> </question>
-->
<answer id="arch-what">
The Filesystems API provides a common API to access files in a uniform manner.
It is available as standalone library and
also is bundled together with other parts of the openide.
<a href="@TOP@/org/openide/filesystems/doc-files/api.html">Specification</a>
</answer>
<questionid="dep-non-nb"> Whatothernon-NetBeansprojectsthisonedependson? <hint> Somenon-NetBeansprojectsarepackagedasNetBeansmodules (see<ahref="http://libs.netbeans.org">libraries</a>)and itispreferedtousethisapproachwhenmoremodulesmay dependonsuchthird-partylibrary. </hint> </question>
-->
<answer id="dep-non-nb">
SAX parser is used to parse layers and attributes in .nbattrs files.
</answer>
<!-- Question: dep-platform
<questionid="dep-platform"> Onwhichplatformsyourmodulerun?Any?Doesitruninthesame way? <hint> IfyourmoduleisusingJNIordealswithspecialdifferencesof OSeslikefilesystems,etc.pleasedescribeherewhattheyare. </hint> </question>
-->
<answer id="dep-platform">
Platform independent. But filesystem impl. on OS must satisfy usual naming conventions.
</answer>
<!-- Question: deploy-jar
<questionid="deploy-jar"> DoyoudeployjustmoduleJARfile(s)orsomeotherfiles? <hint> IfyourmoduleconsistjustfromonemoduleJARfile,justconfirmthat. IfitusesmorethanoneJAR,describewheretherearelocated,how theyrefertoeachother. IfitconsistofmoduleJAR(s)andotherfiles,pleasedescribe whatistheirpurpose,whyotherfilesarenecessary.Please makesurethatinstallation/deinstallationleavesthesystem instateasitwasbeforeinstallation. </hint> </question>
-->
<answer id="deploy-jar">
Filesystems API and SPI is part of <samp>openide.jar</samp>.
</answer>
<questionid="deploy-shared"> Doyouneedtobeinstalledinsharedlocationoronlyinuserdirectory? <hint> Installationlocationshallnotmatter,ifitdoesexplainwhy. </hint> </question>
-->
<answer id="deploy-shared">
As part of openide.jar needs to be in the system directory.
</answer>
<questionid="exec-component"> Isexecutionofyourcodeinfluencedby(string)property ofanyofyourcomponents? <hint> Often<code>JComponent.getClientProperty</code>,<code>Action.getValue</code> or<code>PropertyDescriptor.getValue</code>,etc.areusedtoinfluence abehaviourofsomecode.Thisofcourseformsaninterfacethatshould bedocumented.Alsoifonedependsonsomeinterfacethatanobject implements(<code>componentinstanceofRunnable</code>)thatformsan APIaswell. </hint> </question>
-->
<answer id="exec-component">
<api name="fallback" group="property"type="export" category="stable">
<p>
See documentation of <code>FileSystem</code>.
</p>
</api>
<api name="revealEntries" group="property"type="export" category="devel" url="@TOP@/org/openide/filesystems/MultiFileSystem.html">
<p>
The MultiFileSystem defines some pseudo attributes on files and folders,
which provide rollback features. Please see MultiFileSystem class javadoc
for more information.
</p>
</api>
</answer>
<!-- Question: exec-privateaccess
<questionid="exec-privateaccess"> Areyouawareofanyotherpartofthesystemcallingsomeof yourmethodsbyreflection? <hint> Ifso,describethe"contract"asanAPI.Likelyprivateorfriendone,but stillAPIandconsiderrewriteofit. </hint> </question>
-->
<answer id="exec-privateaccess">
<api category="friend" group="java" name="FileObjectMoveLookup"type="export">
<code>masterfs</code> module is using
a reflection to re-associate the lookup after a move operation.
</api>
</answer>
<!-- Question: exec-property
<questionid="exec-property"> Isexecutionofyourcodeinfluencedbyanyenvironmentof system(<code>System.getProperty</code>)property? <hint> Ifthereisapropertythatcanchangethebehaviourofyour code,somebodywilllikelyuseit.Youshoulddescribewhatitdoes andthestabilitycategoryofthisAPI.Youmayuse <PRE> <propertyname="id"category="private"> descriptionoftheproperty,whereitisused,whatitinfluence,etc. </property> </PRE> </hint> </question>
-->
<answer id="exec-property">
<ul>
<li>
<api type="export" group="systemproperty" name="org.openide.filesystems.DefaultAttributes.ATTR_NAME_EXT_XML" category="private">
Name of attribute file can be changed , if .nbattrs can't be used.
</api></li>
<li><api type="import" group="systemproperty" name="netbeans.debug.heap" category="private">
Periodic refresh can be blocked.
</api></li>
<li><api type="export" group="systemproperty" name="org.openide.filesystems.LocalFileSystem.REFRESH_TIME" category="private">
Periodic refresh can be set.
</api></li>
<li>
<api type="export" group="systemproperty" name="org.openide.filesystems.annotateUnclosedStreams" category="private">
<p>
If <code>true</code>, better diagnostic information will be available as to when file input or
output streams were opened that prevent a file from being deleted because they were not closed.
This information comes at a performance cost, however.
</p>
</api>
</li>
<li>
<api type="export" group="systemproperty" name="allow.filechooser.symlink.traversal"category="private">
Used by FileChooserBuilder. If set to false,
file choosers created by instances of FileChooserBuilder will traverse
symlinks. By default they do not.
</api>
<api type="export" group="systemproperty" name="forget.recent.dirs" category="private">
Used by FileChooserBuilder. If true, FileChooserBuilder will
not remember users' recent directories across sessions. This property
is provided for applications where a history of recently used directories is a
security concern.
</api>
</li>
</ul>
</answer>
<!-- Question: exec-reflection
<questionid="exec-reflection"> Doesyourcodeusesjava.lang.reflecttoexecutesomeothercode? <hint> ThisusuallyindicatesamissingorunsufficientAPIintheother partofthesystem.Iftheothersideisnotawareofyourdependency thiscontractcanbeeasilybroken. </hint> </question>
-->
<answer id="exec-reflection">
<api type="export" group="layer" category="stable" name="methodvalue-newvalue"url="@TOP@/org/openide/filesystems/FileObject.html#setAttribute(java.lang.String,java.lang.Object)">
When special form of <code>setAttribute</code> is supported by the filesystem, the
<code>getAttribute</code> can behave like
<a href="@TOP@/org/openide/filesystems/XMLFileSystem.html">XMLFileSystem</a>'s
<code>methodvalue</code> and <code>newvalue</code> attributes:
<ul>
<li><a href="http://www.netbeans.org/dtds/attributes-1_0.dtd"><code>"-//NetBeans//DTD DefaultAttributes 1.0//EN"</code></a></li>
<li><a href="http://www.netbeans.org/dtds/filesystem-1_0.dtd"><code>"-//NetBeans//DTD Filesystem 1.0//EN"</code></a></li>
</ul>
</api>
<api type="export" group="layer" category="private" name="raw-value">
It is possible to prefix call to <a href="@TOP@/org/openide/filesystems/FileObject.html">FileObject</a>.<code>getAttribute</code>
with <code>raw:</code> prefix to evaluate the attribute without instantiating it
(e.g. get <a href="@JDK@@JDKMODULE_JAVA_BASE@/java/lang/reflect/Method.html">Method</a> or
<a href="@JDK@@JDKMODULE_JAVA_BASE@/java/lang/Class.html">Class</a> values from
<code>methodvalue</code> and <code>newvalue</code> attributes. This API
is not intended for public use at present and can change in future.
</api>
</answer>
<questionid="lookup-lookup"> Doesyourmoduleuses<code>org.openide.util.Lookup</code> tofindanycomponentstocommunicateto?Whichones? <hint> Pleasedescribetheinterfacesyouaresearchingfor,where aredefined,whetheryouaresearchingforjustoneormoreofthem, iftheorderisimportant,etc.Alsoclasifythestabilityofsuch APIcontract. </hint> </question>
-->
<answer id="lookup-lookup">
The following services are looked up:
<ul>
<li>Implementations of MIMEResolver and URLMapper are looked up</li>
<li>instance of FileSystem.Status which is
used as the Status of the <b>default</b> FileSystem</li>
<li>instance of <a href="@TOP@/org/openide/filesystems/spi/CustomInstanceFactory.html">CustomInstanceFactory</a>
which is used to create instances for FileSystem files without <code>instanceCreate</code> attribute</li>
</ul>
</answer>
<!-- Question: lookup-register
<questionid="lookup-register"> Doyouregisteranythingintothelookupforothertofind? <hint> Doyouregisterusinglayerfileorusing<code>META-INF/services</code>? Whoissupposedtofindyourcomponent? </hint> </question>
-->
<answer id="lookup-register">
<code>URLStreamHandlerFactory</code> implementations for <b>nbfs:</b> and
<b>memory:</b> protocols are registered as named services.
</answer>
<questionid="perf-mem"> Whatistheamountofmemoryyourcomponentoccupies?Estimate witharelactiontothenumberofwindows,etc. </question>
-->
<answer id="perf-mem">
Hardly to estimate, depends on many factors. Instances of FileObject
can be kept weak or hard, implementatins of FileObject may differ each other.
Approximately for FileObject that comes
from AbstractFileSystem impl. probably 100 B if size of name is average .
</answer>
<questionid="perf-progress"> Doesyourmoduleexecutessomelongrunningtask? <hint>Typicallytheyaretaskslikeconnectingover network,computinghugeamountofdata,compilation. Suchcommunicationshouldbedoneasynchronously(forexample using<code>RequestProcessor</code>),definitivelyitshould notblockAWTthread. </hint> </question>
-->
<answer id="perf-progress">
There are no such long running tasks except refresh operation, that may be time consuming.
Naturally also operations on FileSystem, that access remote files over network.
</answer>
<!-- Question: perf-scale
<questionid="perf-scale"> Whichexternalcriteriainfluencetheperformanceofyour program(sizeoffileineditor,numberoffilesinmenu, insourcedirectory,etc.)andhowwellyourcodescales? Pleaseincludesomeestimates. </question>
-->
<answer id="perf-scale">
As far as I know the code scales linearily.
</answer>
<questionid="perf-wakeup"> Isanypieceofyourcodewakingupperiodically? </question>
-->
<answer id="perf-wakeup">
No. Periodic refresh is disabled at the moment as default.
</answer>
<!-- <questionid="arch-overall"when="init"> Describetheoverallarchitecture. <hint> WhatwillbeAPIfor <ahref="http://openide.netbeans.org/tutorial/api-design.html#design.apiandspi"shape="rect"> clientsandwhatsupportAPI</a>? Whatpartswillbepluggable? Howwillplug-insberegistered?Pleaseuse<code><apitype="export"/></code> todescribeyourgeneralAPIsandspecifytheir <ahref="http://openide.netbeans.org/tutorial/api-design.html#category-private"shape="rect"> stabilitycategories</a>. Ifpossiblepleaseprovidesimplediagrams. </hint> </question>
-->
<answer id="arch-overall">
<p>
NetBeans internally uses the concept of a virtual filesystem. This module
provide APIs for accessing such virtual files as well as some support classes
to make writing of custom vitual filesystems easier.
</p>
</answer>
<!-- <questionid="arch-usecases"when="init"> <hint> Contentofthisanswerwillbedisplayedaspartofpageat http://www.netbeans.org/download/dev/javadoc/usecases.html Youcanusetags<usecasename="name>regularhtmldescription</usecase> andifyouwanttouseanURLyoucanprefixifwith@TOP@tobegin attherootofyourjavadoc </hint> Describethemain<ahref="http://openide.netbeans.org/tutorial/api-design.html#usecase"shape="rect"> usecases</a>ofthenewAPI.Whowilluseitunder whatcircumstances?Whatkindofcodewouldtypicallyneedtobewritten tousethemodule? </question>
-->
<answer id="arch-usecases">
<p>
<a onclick="target='_blank'"href="https://leanpub.com/nbp4beginners">
<img src="http://wiki.apidesign.org/images/0/03/NetBeansPlatformForBeginners.jpg"
style="float: right"
width="60" height="70" alt="Cover of NetBeans Platform for Beginners book"/>
</a>
For general overview of the filesystem concepts, related topics,
together with code samples, see chapter 3,
of <a onclick="target='_blank'"href="https://leanpub.com/nbp4beginners">NetBeans Platform for Beginners</a>
by Jason Wexbridge and Walter Nyland.
Many of the usecases are described at the
<a href="@TOP@/org/openide/filesystems/doc-files/api.html">overall documentation</a>,
in a way how to
<a href="@TOP@/org/openide/filesystems/doc-files/HOWTO-MIME.html">register a mime type</a>.
Some of the additional usecases are covered here.
</p>
<usecase id="login-changes" name="How to change menus, etc. after login?">
<p>
See <a href="@TOP@/org/openide/filesystems/FileSystem.html">documentation</a>
about dynamically changing the system filesystem.
</p>
</usecase>
</answer>
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.