Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

fs fstat

const fs = require("fs");
let fileFD = fs.openSync('/path/to/file.txt')
let fileStats = fs.fstatSync(fileFD);
fs.closeSync(fileFD);
console.log(fileStats);

/*
Data explanation:

Stats {
  dev: 3334475869,
  mode: 33206,
  nlink: 1,
  uid: 0,
  gid: 0,
  rdev: 0,
  blksize: 4096,
  ino: 2533274790451167,
  size: 1733,                           The total size in bytes.
  blocks: 8,
  atimeMs: 1649094822494.6228,          Access Time in Milliseconds
  mtimeMs: 1649093745577.4001,          Modify Time in Milliseconds
  ctimeMs: 1649093745577.4001,          Change Time in Milliseconds
  birthtimeMs: 1649002721717.3416,      Create Time in Milliseconds
  atime: 2022-04-04T17:53:42.495Z,      Access Time
  mtime: 2022-04-04T17:35:45.577Z,      Modify Time
  ctime: 2022-04-04T17:35:45.577Z,      Change Time
  birthtime: 2022-04-03T16:18:41.717Z   Create Time
}

Access Time = last access to the data of the file system entity
Modify Time = last modification time in milliseconds. 
				For example, the last change to file’s content.
Change Time = last time the file’s inode was changed in milliseconds. 
				Also changes when you change file’s ownership or access permissions.
Create Time = file was first created

https://www.brainbell.com/javascript/fs-stats-structure.html
*/
Comment

node fs

import * as fs from 'fs/promises';
Comment

PREVIOUS NEXT
Code Example
Javascript :: clear form inside modal after close reactjs 
Javascript :: put new attribute on html tag using javascript 
Javascript :: ${} js 
Javascript :: object intersection javascript 
Javascript :: difference between undefined and null javascript 
Javascript :: javascript how to get rid of e with number input 
Javascript :: replace character inside a string in JavaScript 
Javascript :: css variable value changing with javascript 
Javascript :: MaterialStateProperty width 
Javascript :: graphql query 
Javascript :: how to get a due date from current date in javascript 
Javascript :: redux mapstatetoprops get props 
Javascript :: how to use useref hook in react 
Javascript :: javascript catch specific error 
Javascript :: Sequelize.Op; 
Javascript :: abrir dialog angular material 
Javascript :: postgres boolean column 
Javascript :: search through json for key 
Javascript :: javascript deconstruct object 
Javascript :: how to make first letter uppercase in javascript 
Javascript :: moment clone 
Javascript :: find max number in java 
Javascript :: javascript sleep 3 second 
Javascript :: open youtube video at specific time javascript 
Javascript :: razorpay node sdk 
Javascript :: array spread operator in javascript 
Javascript :: node schedule every minute 
Javascript :: jquery window new tab with post 
Javascript :: sub array javascript 
Javascript :: npm hook form 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =