src/models/filesystem/file-system.ts
Serializable REDHAWK Model of the SCA FileSystem interface.
Properties |
Methods |
constructor()
|
Defined in src/models/filesystem/file-system.ts:13
|
deserialize | ||||||||
deserialize(input: any)
|
||||||||
Defined in src/models/filesystem/file-system.ts:22
|
||||||||
Deserializes a JSON object into this class
Parameters :
Returns :
this
|
contents |
contents:
|
Type : string
|
Defined in src/models/filesystem/file-system.ts:13
|
Contents of the path (if it's a file) |
directories |
directories:
|
Type : Array<IFileSystemPath>
|
Defined in src/models/filesystem/file-system.ts:11
|
Directories in the path |
files |
files:
|
Type : Array<IFileSystemPath>
|
Defined in src/models/filesystem/file-system.ts:9
|
Files in the path |
import { ISerializable } from '../serialization/index';
import { IFileSystemPath } from './file-system-path';
/**
* Serializable REDHAWK Model of the SCA FileSystem interface.
*/
export class FileSystem implements ISerializable<FileSystem> {
/** Files in the path */
files: Array<IFileSystemPath>;
/** Directories in the path */
directories: Array<IFileSystemPath>;
/** Contents of the path (if it's a file) */
contents: string;
/** Constructor */
constructor() {
this.files = [];
this.directories = [];
}
/** Deserializes a JSON object into this class */
deserialize(input: any) {
this.files = input.files;
this.directories = input.directories;
this.contents = input.contents;
return this;
}
}