Skip to content
This repository was archived by the owner on Aug 5, 2020. It is now read-only.
This repository was archived by the owner on Aug 5, 2020. It is now read-only.

Different return value of sync and async methods #42

@secult

Description

@secult

On Windows 7 I get the following behavior:
`

fsf=require('fs-filesystem')
let response = fsf.filesystemSync('C:')
console.log(response)
{ 'C:':
{ id: 'C:',
node: 'C:',
whole: true,
parent: 'C:',
name: 'C:',
size: 214748360704,
description: 'Local Fixed Disk',
protocol: null,
blockSize: null,
readOnly: null,
removable: false,
volumes: [ [Object] ] } }

fsf.default('C:',(err,response)=>{console.log(response)})
{ devices:
{ 'C:':
{ id: 'C:',
node: 'C:',
whole: true,
parent: 'C:',
name: 'C:',
size: 214748360704,
description: 'Local Fixed Disk',
protocol: null,
blockSize: null,
readOnly: null,
removable: false,
volumes: [Array] } } }
`

I would expect that I receive the same structure, e.g. filesystem async return value should be returned without the devices accommodating object (as shown in the documentation). Or perhaps it should be highlighted in the documentation that the return value object structure of filesystemSync is different based on the filter parameter (to not introduce breaking change to the library).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions