// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import { Create as $Create } from "@wailsio/runtime";

/**
 * An FS is a read-only collection of files, usually initialized with a //go:embed directive.
 * When declared without a //go:embed directive, an FS is an empty file system.
 * 
 * An FS is a read-only value, so it is safe to use from multiple goroutines
 * simultaneously and also safe to assign values of type FS to each other.
 * 
 * FS implements fs.FS, so it can be used with any package that understands
 * file system interfaces, including net/http, text/template, and html/template.
 * 
 * See the package documentation for more details about initializing an FS.
 */
export class FS {

    /** Creates a new FS instance. */
    constructor($$source: Partial<FS> = {}) {

        Object.assign(this, $$source);
    }

    /**
     * Creates a new FS instance from a string or object.
     */
    static createFrom($$source: any = {}): FS {
        let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
        return new FS($$parsedSource as Partial<FS>);
    }
}
