File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export class File extends Node {
1515 * Returns a clone of the file
1616 */
1717 clone ( ) : File {
18- return new File ( this . data )
18+ return new File ( this . _data , this . _knownDavService )
1919 }
2020
2121}
Original file line number Diff line number Diff line change @@ -8,12 +8,12 @@ import { Node } from './node'
88
99export class Folder extends Node {
1010
11- constructor ( data : NodeData ) {
11+ constructor ( data : NodeData , davService ?: RegExp ) {
1212 // enforcing mimes
1313 super ( {
1414 ...data ,
1515 mime : 'httpd/unix-directory' ,
16- } )
16+ } , davService )
1717 }
1818
1919 get type ( ) : FileType . Folder {
@@ -32,7 +32,7 @@ export class Folder extends Node {
3232 * Returns a clone of the folder
3333 */
3434 clone ( ) : Folder {
35- return new Folder ( this . data )
35+ return new Folder ( this . _data , this . _knownDavService )
3636 }
3737
3838}
Original file line number Diff line number Diff line change @@ -23,9 +23,10 @@ export enum NodeStatus {
2323
2424export abstract class Node {
2525
26- private _data : NodeData
2726 private _attributes : Attribute
28- private _knownDavService = / ( r e m o t e | p u b l i c ) \. p h p \/ ( w e b ) ? d a v / i
27+
28+ protected _data : NodeData
29+ protected _knownDavService = / ( r e m o t e | p u b l i c ) \. p h p \/ ( w e b ) ? d a v / i
2930
3031 private readonlyAttributes = Object . entries ( Object . getOwnPropertyDescriptors ( Node . prototype ) )
3132 . filter ( e => typeof e [ 1 ] . get === 'function' && e [ 0 ] !== '__proto__' )
@@ -346,13 +347,6 @@ export abstract class Node {
346347 this . _data . status = status
347348 }
348349
349- /**
350- * Get the node data
351- */
352- get data ( ) : NodeData {
353- return structuredClone ( this . _data )
354- }
355-
356350 /**
357351 * Move the node to a new destination
358352 *
You can’t perform that action at this time.
0 commit comments