Home > front end >  How to use nodejs (or third-party modules) to modify the attributes of a file "detailed informa
How to use nodejs (or third-party modules) to modify the attributes of a file "detailed informa

Time:09-19

As shown in figure:


Demand (expect) :
Using nodejs (or third-party modules) to modify the attributes of a file "details",

Tip:
1, if you can't modify, get to also go,
2. Not nodejs, PHP or other way also ok (as long as you not tell me manually change)

CodePudding user response:

If you have permission can read the file stream, to regenerate the images before modify the file attributes and then cover images,

CodePudding user response:

reference 1st floor jio can reply:
if you have permissions to read file stream, to regenerate the images before modify the file attributes and then cover images,

Is a local file permissions must be,
Specific how to modify the file attributes (set)? I want the video file's title (the title),
In fact, from a technical point of view, demand is larger, the attributes in the "details", whether can access and modify? Even if you can add or delete?

CodePudding user response:

var fs=require("fs");

Take action,

OS lib is about the system, the fs lib is file operation, the path lib is path of operation, simple

CodePudding user response:

The
reference 3 floor qyci response:
var fs=the require (" fs ");

Take action,

OS lib is about the system, the fs lib is file operation, the path lib is path of operation, simple right


I'm sorry, OS of nodejs module, fs module, path module can't do it,,,,
A Stats in the fs class, it can obtain "property" is not what I want,

To be honest, I'm a search engine searched but could not find a usable, so didn't come here to ask,

CodePudding user response:

Anybody can handle it? So I tried to modify some of the information (data), as shown in the figure below:

CodePudding user response:

To a node. Js calls the Windows API code, perhaps to you is:
Var FFI=the require (' node - FFI);

The function of TEXT (TEXT) {
Return new Buffer (text, 'ucs2). ToString (' binary');
}

Var user32=new FFI. Library (' user32 '{
'MessageBoxW: [
[' 'int32, int32', 'string', 'string', 'int32]
]
});

Var OK_or_Cancel=user32. MessageBoxW (
0, TEXT (" I am Node. JS! '), TEXT (" Hello, World! 1
'),);
  • Related