FileBlock
Extends
Constructors
Constructor
new FileBlock(
filename
,content
,start
,end
,tag
,options?
):FileBlock
Parameters
Parameter | Type |
---|---|
|
|
|
|
|
|
|
|
|
|
|
Returns
FileBlock
Overrides
Properties
Property | Modifier | Type | Default value | Inherited from |
---|---|---|---|---|
|
|
| ||
|
|
|
‐ | |
|
|
| ||
|
|
| ||
|
|
|
‐ | |
|
|
|
Methods
addBlockToContent()
protected
addBlockToContent(existingContent
):string
Parameters
Parameter | Type |
---|---|
|
|
Returns
string
buildContent()
protected
buildContent():Promise
<string
>
Returns
Promise
<string
>
Inherited from
buildHeader()
protected
buildHeader():string
Returns
string
Inherited from
buildPadding()
protected
buildPadding(existingContent
):""
| "\n" | "\n\n"
Parameters
Parameter | Type |
---|---|
|
|
Returns
""
| "\n" | "\n\n"
createComment()
protected
createComment(comment
):string
Parameters
Parameter | Type |
---|---|
|
|
Returns
string
Inherited from
getExistingContent()
protected
getExistingContent():Promise
<readonly [string
,FileHandle
] | readonly [""
,null
]>
Returns
Promise
<readonly [string
, FileHandle
] | readonly [""
, null
]>
getSlices()
protected
getSlices(existingContent
): readonly [string
,""
,false
] | readonly [string
,string
,true
]
Parameters
Parameter | Type |
---|---|
|
|
Returns
readonly [string
, ""
, false
] | readonly [string
, string
, true
]
unlink()
unlink():
Promise
<void
>
Returns
Promise
<void
>
Overrides
write()
write():
Promise
<void
>
Returns
Promise
<void
>