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 :: convert 12 hour to 24 hour javascript 
Javascript :: use of prototype in javascript 
Javascript :: javascript invert number 
Javascript :: javascript array cheatsheet 
Javascript :: table to excel javascript 
Javascript :: how to scroll automatically to the bottom of the page using javascript 
Javascript :: moment add 
Javascript :: mongoose schema for nested items 
Javascript :: jsx attributes 
Javascript :: vuejs methods 
Javascript :: Remove uploaded file in jquery 
Javascript :: generator function in javascript 
Javascript :: javascript post request 
Javascript :: how to add prefix to a string in javascript 
Javascript :: assing multipe ids jquery to event 
Javascript :: Accessing HTML attributes in DOM 
Javascript :: JavaScript for loop Display Numbers from 1 to 5 
Javascript :: JavaScript Number Objects 
Javascript :: javascript remaining elements of an array to a variable using the spread syntax 
Javascript :: random number 1-3 
Javascript :: find the missing number javascript 
Javascript :: pyautogui javascript 
Javascript :: javascript copy by reference 
Javascript :: node add dependency 
Javascript :: phaser export animation to json 
Javascript :: generate random email account javascript 
Javascript :: Expresiones regulares para diferentes tipos de campos de formularios 
Javascript :: mobile angular service 
Javascript :: javascript array includes 
Javascript :: regex capture group example 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =