/** Deletes a all mask files that mask the given file. All * higher levels then fs are checked and mask is deleted if necessary * @param fs filesystem where res is placed * @param res resource name of the file that should be unmasked * @exception IOException if it fails */ void unmaskFileOnAll(FileSystem fs, String res) throws IOException { FileSystem[] fss = this.getDelegates(); for (int i = 0; i < fss.length; i++) { if ((fss[i] == null) || fss[i].isReadOnly()) { continue; } unmaskFile(fss[i], res); /** unamsk on all higher levels, which mask files on fs-layer */ if (fss[i] == fs) { return; } } }
/** Marks a resource as hidden. It will not be listed in the list of files. * Uses createMaskOn method to determine on which filesystem to mark the file. * * @param res resource name of file to hide or show * @param hide true if we should hide the file/false otherwise * @exception IOException if it is not possible */ protected final void hideResource(String res, boolean hide) throws IOException { if (hide) { // mask file maskFile(createWritableOn(res), res); } else { unmaskFile(createWritableOn(res), res); } }
/** Deletes a all mask files that mask the given file. All * higher levels then fs are checked and mask is deleted if necessary * @param fs filesystem where res is placed * @param res resource name of the file that should be unmasked * @exception IOException if it fails */ void unmaskFileOnAll (FileSystem fs,String res) throws IOException { FileSystem[] fss = this.getDelegates(); for (int i = 0; i < fss.length ; i++) { if (fss[i] == null || fss[i].isReadOnly()) continue; unmaskFile (fss[i], res); /** unamsk on all higher levels, which mask files on fs-layer */ if (fss[i] == fs) return; } }
/** Deletes a all mask files that mask the given file. All * higher levels then fs are checked and mask is deleted if necessary * @param fs filesystem where res is placed * @param res resource name of the file that should be unmasked * @exception IOException if it fails */ void unmaskFileOnAll (FileSystem fs,String res) throws IOException { FileSystem[] fss = this.getDelegates(); for (int i = 0; i < fss.length ; i++) { if (fss[i] == null || fss[i].isReadOnly()) continue; unmaskFile (fss[i], res); /** unamsk on all higher levels, which mask files on fs-layer */ if (fss[i] == fs) return; } }
/** Marks a resource as hidden. It will not be listed in the list of files. * Uses createMaskOn method to determine on which filesystem to mark the file. * * @param res resource name of file to hide or show * @param hide true if we should hide the file/false otherwise * @exception IOException if it is not possible */ protected final void hideResource (String res, boolean hide) throws IOException { if (hide) { // mask file maskFile (createWritableOn (res), res); } else { unmaskFile (createWritableOn (res), res); } }
/** Marks a resource as hidden. It will not be listed in the list of files. * Uses createMaskOn method to determine on which filesystem to mark the file. * * @param res resource name of file to hide or show * @param hide true if we should hide the file/false otherwise * @exception IOException if it is not possible */ protected final void hideResource (String res, boolean hide) throws IOException { if (hide) { // mask file maskFile (createWritableOn (res), res); } else { unmaskFile (createWritableOn (res), res); } }