SlideShare a Scribd company logo
1 of 21
System Information
 System Information
 Get Drive information in current system
 Get info of specific Drive
 Available Free Space
 DriveFormat
 IsReady
 Name
 RootDirectory
 TotalFreeSpace
 TotalSize
 VolumeLabel
 List Drive
 List Sub folders
 List Files


 System.IO.FileInfo
 Provides properties and instance methods for the creation, copying,
deletion, moving, and opening of files, and aids in the creation
of FileStream objects. This class cannot be inherited.
 System.IO.DirectoryInfo
 Exposes instance methods for creating, moving, and enumerating
through directories and subdirectories. This class cannot be
inherited.
 System.IO.DriveInfo
 Provides access to information on a drive.
 System.IO.Directory
 Exposes static methods for creating, moving, and enumerating
through directories and subdirectories. This class cannot be
inherited.
 Public Attributes
 Gets or sets the attributes for the current file or directory.
(Inherited from FileSystemInfo.)
 Public CreationTime
 Gets or sets the creation time of the current file or directory.
(Inherited from FileSystemInfo.)
 Public property CreationTimeUtc
 Gets or sets the creation time, in coordinated universal time
(UTC), of the current file or directory. (Inherited from
FileSystemInfo.)
 Public Directory
 Gets an instance of the parent directory.
 Public DirectoryName
 Gets a string representing the directory's full path.
 Public Exists
 Gets a value indicating whether a file exists. (Overrides
FileSystemInfo.Exists.)
 Public Extension
 Gets the string representing the extension part of the file.
(Inherited from FileSystemInfo.)
 Public FullName
 Gets the full path of the directory or file. (Inherited from
FileSystemInfo.)
 Public property IsReadOnly
 Gets or sets a value that determines if the current file is read
only.
 Public LastAccessTime
 Gets or sets the time the current file or directory was last
accessed. (Inherited from FileSystemInfo.)
 Public property LastAccessTimeUtc
 Gets or sets the time, in coordinated universal time (UTC),
that the current file or directory was last accessed. (Inherited
from FileSystemInfo.)
 Public LastWriteTime
 Gets or sets the time when the current file or directory was last
written to. (Inherited from FileSystemInfo.)
 Public property LastWriteTimeUtc
 Gets or sets the time, in coordinated universal time (UTC),
when the current file or directory was last written to.
(Inherited from FileSystemInfo.)
 Public Length
 Gets the size, in bytes, of the current file.
 Public Name
 Gets the name of the file. (Overrides FileSystemInfo.Name.)
DirectoryInfo Class
 Exposes instance methods for creating, moving, and
enumerating through directories and subdirectories.
This class cannot be inherited.
 Properties
 Public property Attributes
 Gets or sets the attributes for the current file or directory.
(Inherited from FileSystemInfo.)
 Public property CreationTime
 Gets or sets the creation time of the current file or directory.
(Inherited from FileSystemInfo.)
 Public property CreationTimeUtc
 Gets or sets the creation time, in coordinated universal time
(UTC), of the current file or directory. (Inherited from
FileSystemInfo.)
 Public Exists
 Gets a value indicating whether the directory exists.
(Overrides FileSystemInfo.Exists.)
 Public Extension
 Gets the string representing the extension part of the file.
(Inherited from FileSystemInfo.)
 Public FullName
 Gets the full path of the directory or file. (Inherited from
FileSystemInfo.)
 Public LastAccessTime
 Gets or sets the time the current file or directory was last
accessed. (Inherited from FileSystemInfo.)
 Public LastAccessTimeUtc
 Gets or sets the time, in coordinated universal time (UTC),
that the current file or directory was last accessed. (Inherited
from FileSystemInfo.)
 Public LastWriteTime
 Gets or sets the time when the current file or directory was
last written to. (Inherited from FileSystemInfo.)
 Public property LastWriteTimeUtc
 Gets or sets the time, in coordinated universal time (UTC),
when the current file or directory was last written to.
(Inherited from FileSystemInfo.)
 Public Name
 Gets the name of this DirectoryInfo instance. (Overrides
FileSystemInfo.Name.)
 Public Parent
 Gets the parent directory of a specified subdirectory.
 Public Root
 Gets the root portion of the directory.
System.IO.DriveInfo
 Public property AvailableFreeSpace
 Indicates the amount of available free space on a drive, in
bytes.
 Public property DriveFormat
 Gets the name of the file system, such as NTFS or FAT32.
 Public property DriveType
 Gets the drive type, such as CD-ROM, removable, network,
or fixed.
 Public property IsReady
 Gets a value that indicates whether a drive is ready.
 Public property Name
 Gets the name of a drive, such as C:.
 Public property RootDirectory
 Gets the root directory of a drive.
 Public property TotalFreeSpace
 Gets the total amount of free space available on a drive, in
bytes.
 Public property TotalSize
 Gets the total size of storage space on a drive, in bytes.
 Public property VolumeLabel
 Gets or sets the volume label of a drive.
Methods DriveInfo and Example
 GetDrives()
Retrieves the drive names of all logical drives on a
computer.
Directory Class
 Methods
 Delete(String)
 Deletes an empty directory from a specified path.
 Exists()
 Determines whether the given path refers to an existing directory
on disk.
 GetAccessControl(String)
 Gets a DirectorySecurity object that encapsulates the access
control list (ACL) entries for a specified directory
 GetCurrentDirectory()
 Returns the names of subdirectories (including their paths) in the
specified directory.
Example of Drive Info
public static void Main()
{
DriveInfo[] allDrives = DriveInfo.GetDrives();
foreach (DriveInfo d in allDrives)
{
Console.WriteLine("Drive {0}", d.Name);
Console.WriteLine(" File type: {0}", d.DriveType);
if (d.IsReady == true)
{
Console.WriteLine(" Volume label: {0}", d.VolumeLabel);
Console.WriteLine(" File system: {0}", d.DriveFormat);
Console.WriteLine(
" Available space to current user:{0, 15} bytes",
d.AvailableFreeSpace);
Console.WriteLine(
" Total available space: {0, 15} bytes",
d.TotalFreeSpace);
Console.WriteLine(
" Total size of drive: {0, 15} bytes ",
d.TotalSize);
}
}
System.Console.ReadLine();
}
Drive C:
File type: Fixed
Volume label: Windows
File system: NTFS
Available space to current user: 135662944256 bytes
Total available space: 135662944256 bytes
Total size of drive: 320070479872 bytes
Drive D:
File type: CDRom
Drive Q:
File type: Fixed
 Example of File info
 Total PhysicalMemory example

More Related Content

What's hot

Advanced file permissions in linux
Advanced file permissions in linuxAdvanced file permissions in linux
Advanced file permissions in linuxMohit Singh
 
Java 7 - short intro to NIO.2
Java 7 - short intro to NIO.2Java 7 - short intro to NIO.2
Java 7 - short intro to NIO.2Martijn Verburg
 
intro unix/linux 09
intro unix/linux 09intro unix/linux 09
intro unix/linux 09duquoi
 
Linux commands cheat sheet by linoxide.com
Linux commands cheat sheet by linoxide.comLinux commands cheat sheet by linoxide.com
Linux commands cheat sheet by linoxide.comStavros Skamagkis
 
Linux command line cheatsheet
Linux command line cheatsheetLinux command line cheatsheet
Linux command line cheatsheetWe Ihaveapc
 
Techniques for Cross Platform .NET Development
Techniques for Cross Platform .NET DevelopmentTechniques for Cross Platform .NET Development
Techniques for Cross Platform .NET DevelopmentJeremy Hutchinson
 
Applecmdlista zs
Applecmdlista zsApplecmdlista zs
Applecmdlista zsBen Pope
 

What's hot (13)

Advanced file permissions in linux
Advanced file permissions in linuxAdvanced file permissions in linux
Advanced file permissions in linux
 
File permissions
File permissionsFile permissions
File permissions
 
Java 7 - short intro to NIO.2
Java 7 - short intro to NIO.2Java 7 - short intro to NIO.2
Java 7 - short intro to NIO.2
 
Linux ppt
Linux pptLinux ppt
Linux ppt
 
intro unix/linux 09
intro unix/linux 09intro unix/linux 09
intro unix/linux 09
 
Linux commands cheat sheet by linoxide.com
Linux commands cheat sheet by linoxide.comLinux commands cheat sheet by linoxide.com
Linux commands cheat sheet by linoxide.com
 
Linux command line cheatsheet
Linux command line cheatsheetLinux command line cheatsheet
Linux command line cheatsheet
 
Oop lecture9 11
Oop lecture9 11Oop lecture9 11
Oop lecture9 11
 
Find and locate
Find and locateFind and locate
Find and locate
 
Techniques for Cross Platform .NET Development
Techniques for Cross Platform .NET DevelopmentTechniques for Cross Platform .NET Development
Techniques for Cross Platform .NET Development
 
Linux cheat-sheet
Linux cheat-sheetLinux cheat-sheet
Linux cheat-sheet
 
Unix3
Unix3Unix3
Unix3
 
Applecmdlista zs
Applecmdlista zsApplecmdlista zs
Applecmdlista zs
 

Viewers also liked

8 Open HT, 2005, 68.966 € For Sale Yacht Brochure. Presented By longitude64.ch
8 Open HT, 2005, 68.966 € For Sale Yacht Brochure. Presented By longitude64.ch8 Open HT, 2005, 68.966 € For Sale Yacht Brochure. Presented By longitude64.ch
8 Open HT, 2005, 68.966 € For Sale Yacht Brochure. Presented By longitude64.chLongitude 64 Switzerland
 
8 lezionex
8 lezionex8 lezionex
8 lezioneximartini
 
8-MK-Electric Switch Boards.PDF
8-MK-Electric Switch Boards.PDF8-MK-Electric Switch Boards.PDF
8-MK-Electric Switch Boards.PDFMukund Kamdar
 
SMART CITIES - Mobilità, Logistica ed Energia
SMART CITIES - Mobilità, Logistica ed EnergiaSMART CITIES - Mobilità, Logistica ed Energia
SMART CITIES - Mobilità, Logistica ed EnergiaeAmbiente
 
8 r angi no5 medeelliin proces
8 r angi no5 medeelliin proces8 r angi no5 medeelliin proces
8 r angi no5 medeelliin processhulam
 
8th alg -l1.7
8th alg -l1.78th alg -l1.7
8th alg -l1.7jdurst65
 
8th alg -l9.2
8th alg -l9.28th alg -l9.2
8th alg -l9.2jdurst65
 
8th grade reading syllabus
8th grade reading syllabus8th grade reading syllabus
8th grade reading syllabusmasenhimerd
 
8 Inspiring Quotes on Ideas for Entepreneurs
8 Inspiring Quotes on Ideas for Entepreneurs8 Inspiring Quotes on Ideas for Entepreneurs
8 Inspiring Quotes on Ideas for EntepreneursBePlum
 
L'Opinion - Sondage Jour du Vote - Élections départementales 2015 - Sur quels...
L'Opinion - Sondage Jour du Vote - Élections départementales 2015 - Sur quels...L'Opinion - Sondage Jour du Vote - Élections départementales 2015 - Sur quels...
L'Opinion - Sondage Jour du Vote - Élections départementales 2015 - Sur quels...OpinionWay
 
Лекція 8 iso 9000
Лекція 8 iso 9000Лекція 8 iso 9000
Лекція 8 iso 9000Pavlo Syrvatka
 
홍콩침례대학 빅데이터 웹보메트릭스 특강 8 may 2015
홍콩침례대학 빅데이터 웹보메트릭스 특강 8 may 2015홍콩침례대학 빅데이터 웹보메트릭스 특강 8 may 2015
홍콩침례대학 빅데이터 웹보메트릭스 특강 8 may 2015Han Woo PARK
 
8.tallerpractico10 mel 1
8.tallerpractico10 mel 18.tallerpractico10 mel 1
8.tallerpractico10 mel 1eduardomr
 

Viewers also liked (17)

8 Open HT, 2005, 68.966 € For Sale Yacht Brochure. Presented By longitude64.ch
8 Open HT, 2005, 68.966 € For Sale Yacht Brochure. Presented By longitude64.ch8 Open HT, 2005, 68.966 € For Sale Yacht Brochure. Presented By longitude64.ch
8 Open HT, 2005, 68.966 € For Sale Yacht Brochure. Presented By longitude64.ch
 
8 lezionex
8 lezionex8 lezionex
8 lezionex
 
8-MK-Electric Switch Boards.PDF
8-MK-Electric Switch Boards.PDF8-MK-Electric Switch Boards.PDF
8-MK-Electric Switch Boards.PDF
 
SMART CITIES - Mobilità, Logistica ed Energia
SMART CITIES - Mobilità, Logistica ed EnergiaSMART CITIES - Mobilità, Logistica ed Energia
SMART CITIES - Mobilità, Logistica ed Energia
 
8 r angi no5 medeelliin proces
8 r angi no5 medeelliin proces8 r angi no5 medeelliin proces
8 r angi no5 medeelliin proces
 
8 erfin blok 13
8 erfin blok 138 erfin blok 13
8 erfin blok 13
 
8th alg -l1.7
8th alg -l1.78th alg -l1.7
8th alg -l1.7
 
8th alg -l9.2
8th alg -l9.28th alg -l9.2
8th alg -l9.2
 
8th grade reading syllabus
8th grade reading syllabus8th grade reading syllabus
8th grade reading syllabus
 
8 Inspiring Quotes on Ideas for Entepreneurs
8 Inspiring Quotes on Ideas for Entepreneurs8 Inspiring Quotes on Ideas for Entepreneurs
8 Inspiring Quotes on Ideas for Entepreneurs
 
L'Opinion - Sondage Jour du Vote - Élections départementales 2015 - Sur quels...
L'Opinion - Sondage Jour du Vote - Élections départementales 2015 - Sur quels...L'Opinion - Sondage Jour du Vote - Élections départementales 2015 - Sur quels...
L'Opinion - Sondage Jour du Vote - Élections départementales 2015 - Sur quels...
 
8 Marzo - Martxoaren 8a
 8 Marzo - Martxoaren 8a 8 Marzo - Martxoaren 8a
8 Marzo - Martxoaren 8a
 
8th cs and is dec 2015
8th cs and is dec 20158th cs and is dec 2015
8th cs and is dec 2015
 
Лекція 8 iso 9000
Лекція 8 iso 9000Лекція 8 iso 9000
Лекція 8 iso 9000
 
홍콩침례대학 빅데이터 웹보메트릭스 특강 8 may 2015
홍콩침례대학 빅데이터 웹보메트릭스 특강 8 may 2015홍콩침례대학 빅데이터 웹보메트릭스 특강 8 may 2015
홍콩침례대학 빅데이터 웹보메트릭스 특강 8 may 2015
 
8.tallerpractico10 mel 1
8.tallerpractico10 mel 18.tallerpractico10 mel 1
8.tallerpractico10 mel 1
 
8º pentecoste 2015 ciclo b
8º pentecoste  2015  ciclo b8º pentecoste  2015  ciclo b
8º pentecoste 2015 ciclo b
 

Similar to 8.C#

Similar to 8.C# (20)

Chapter 10 - File System Interface
Chapter 10 - File System InterfaceChapter 10 - File System Interface
Chapter 10 - File System Interface
 
file management_osnotes.ppt
file management_osnotes.pptfile management_osnotes.ppt
file management_osnotes.ppt
 
Intake 38 10
Intake 38 10Intake 38 10
Intake 38 10
 
Intake 37 11
Intake 37 11Intake 37 11
Intake 37 11
 
WhatsNewNIO2.pdf
WhatsNewNIO2.pdfWhatsNewNIO2.pdf
WhatsNewNIO2.pdf
 
Ch11 OS
Ch11 OSCh11 OS
Ch11 OS
 
OSCh11
OSCh11OSCh11
OSCh11
 
OS_Ch11
OS_Ch11OS_Ch11
OS_Ch11
 
History
HistoryHistory
History
 
My History
My HistoryMy History
My History
 
File Management.ppt
File Management.pptFile Management.ppt
File Management.ppt
 
CH11.pdf
CH11.pdfCH11.pdf
CH11.pdf
 
Ch10
Ch10Ch10
Ch10
 
File system interfacefinal
File system interfacefinalFile system interfacefinal
File system interfacefinal
 
NIO.2, the I/O API for the future
NIO.2, the I/O API for the futureNIO.2, the I/O API for the future
NIO.2, the I/O API for the future
 
Chapter 5 Class File
Chapter 5 Class FileChapter 5 Class File
Chapter 5 Class File
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Chapter 2 Linux File System and net.pptx
Chapter 2 Linux File System and net.pptxChapter 2 Linux File System and net.pptx
Chapter 2 Linux File System and net.pptx
 
10.file system interface
10.file system interface10.file system interface
10.file system interface
 
Operating System
Operating SystemOperating System
Operating System
 

More from Raghu nath

Ftp (file transfer protocol)
Ftp (file transfer protocol)Ftp (file transfer protocol)
Ftp (file transfer protocol)Raghu nath
 
Javascript part1
Javascript part1Javascript part1
Javascript part1Raghu nath
 
Regular expressions
Regular expressionsRegular expressions
Regular expressionsRaghu nath
 
Selection sort
Selection sortSelection sort
Selection sortRaghu nath
 
Binary search
Binary search Binary search
Binary search Raghu nath
 
JSON(JavaScript Object Notation)
JSON(JavaScript Object Notation)JSON(JavaScript Object Notation)
JSON(JavaScript Object Notation)Raghu nath
 
Stemming algorithms
Stemming algorithmsStemming algorithms
Stemming algorithmsRaghu nath
 
Step by step guide to install dhcp role
Step by step guide to install dhcp roleStep by step guide to install dhcp role
Step by step guide to install dhcp roleRaghu nath
 
Network essentials chapter 4
Network essentials  chapter 4Network essentials  chapter 4
Network essentials chapter 4Raghu nath
 
Network essentials chapter 3
Network essentials  chapter 3Network essentials  chapter 3
Network essentials chapter 3Raghu nath
 
Network essentials chapter 2
Network essentials  chapter 2Network essentials  chapter 2
Network essentials chapter 2Raghu nath
 
Network essentials - chapter 1
Network essentials - chapter 1Network essentials - chapter 1
Network essentials - chapter 1Raghu nath
 
Python chapter 2
Python chapter 2Python chapter 2
Python chapter 2Raghu nath
 
python chapter 1
python chapter 1python chapter 1
python chapter 1Raghu nath
 
Linux Shell Scripting
Linux Shell ScriptingLinux Shell Scripting
Linux Shell ScriptingRaghu nath
 

More from Raghu nath (20)

Mongo db
Mongo dbMongo db
Mongo db
 
Ftp (file transfer protocol)
Ftp (file transfer protocol)Ftp (file transfer protocol)
Ftp (file transfer protocol)
 
MS WORD 2013
MS WORD 2013MS WORD 2013
MS WORD 2013
 
Msword
MswordMsword
Msword
 
Ms word
Ms wordMs word
Ms word
 
Javascript part1
Javascript part1Javascript part1
Javascript part1
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
Selection sort
Selection sortSelection sort
Selection sort
 
Binary search
Binary search Binary search
Binary search
 
JSON(JavaScript Object Notation)
JSON(JavaScript Object Notation)JSON(JavaScript Object Notation)
JSON(JavaScript Object Notation)
 
Stemming algorithms
Stemming algorithmsStemming algorithms
Stemming algorithms
 
Step by step guide to install dhcp role
Step by step guide to install dhcp roleStep by step guide to install dhcp role
Step by step guide to install dhcp role
 
Network essentials chapter 4
Network essentials  chapter 4Network essentials  chapter 4
Network essentials chapter 4
 
Network essentials chapter 3
Network essentials  chapter 3Network essentials  chapter 3
Network essentials chapter 3
 
Network essentials chapter 2
Network essentials  chapter 2Network essentials  chapter 2
Network essentials chapter 2
 
Network essentials - chapter 1
Network essentials - chapter 1Network essentials - chapter 1
Network essentials - chapter 1
 
Python chapter 2
Python chapter 2Python chapter 2
Python chapter 2
 
python chapter 1
python chapter 1python chapter 1
python chapter 1
 
Linux Shell Scripting
Linux Shell ScriptingLinux Shell Scripting
Linux Shell Scripting
 
Perl
PerlPerl
Perl
 

Recently uploaded

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Recently uploaded (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

8.C#

  • 2.  System Information  Get Drive information in current system  Get info of specific Drive  Available Free Space  DriveFormat  IsReady  Name  RootDirectory  TotalFreeSpace  TotalSize  VolumeLabel  List Drive  List Sub folders  List Files  
  • 3.  System.IO.FileInfo  Provides properties and instance methods for the creation, copying, deletion, moving, and opening of files, and aids in the creation of FileStream objects. This class cannot be inherited.  System.IO.DirectoryInfo  Exposes instance methods for creating, moving, and enumerating through directories and subdirectories. This class cannot be inherited.  System.IO.DriveInfo  Provides access to information on a drive.  System.IO.Directory  Exposes static methods for creating, moving, and enumerating through directories and subdirectories. This class cannot be inherited.
  • 4.  Public Attributes  Gets or sets the attributes for the current file or directory. (Inherited from FileSystemInfo.)  Public CreationTime  Gets or sets the creation time of the current file or directory. (Inherited from FileSystemInfo.)  Public property CreationTimeUtc  Gets or sets the creation time, in coordinated universal time (UTC), of the current file or directory. (Inherited from FileSystemInfo.)
  • 5.  Public Directory  Gets an instance of the parent directory.  Public DirectoryName  Gets a string representing the directory's full path.  Public Exists  Gets a value indicating whether a file exists. (Overrides FileSystemInfo.Exists.)
  • 6.  Public Extension  Gets the string representing the extension part of the file. (Inherited from FileSystemInfo.)  Public FullName  Gets the full path of the directory or file. (Inherited from FileSystemInfo.)  Public property IsReadOnly  Gets or sets a value that determines if the current file is read only.
  • 7.  Public LastAccessTime  Gets or sets the time the current file or directory was last accessed. (Inherited from FileSystemInfo.)  Public property LastAccessTimeUtc  Gets or sets the time, in coordinated universal time (UTC), that the current file or directory was last accessed. (Inherited from FileSystemInfo.)  Public LastWriteTime  Gets or sets the time when the current file or directory was last written to. (Inherited from FileSystemInfo.)
  • 8.  Public property LastWriteTimeUtc  Gets or sets the time, in coordinated universal time (UTC), when the current file or directory was last written to. (Inherited from FileSystemInfo.)  Public Length  Gets the size, in bytes, of the current file.  Public Name  Gets the name of the file. (Overrides FileSystemInfo.Name.)
  • 9. DirectoryInfo Class  Exposes instance methods for creating, moving, and enumerating through directories and subdirectories. This class cannot be inherited.  Properties
  • 10.  Public property Attributes  Gets or sets the attributes for the current file or directory. (Inherited from FileSystemInfo.)  Public property CreationTime  Gets or sets the creation time of the current file or directory. (Inherited from FileSystemInfo.)  Public property CreationTimeUtc  Gets or sets the creation time, in coordinated universal time (UTC), of the current file or directory. (Inherited from FileSystemInfo.)
  • 11.  Public Exists  Gets a value indicating whether the directory exists. (Overrides FileSystemInfo.Exists.)  Public Extension  Gets the string representing the extension part of the file. (Inherited from FileSystemInfo.)  Public FullName  Gets the full path of the directory or file. (Inherited from FileSystemInfo.)
  • 12.  Public LastAccessTime  Gets or sets the time the current file or directory was last accessed. (Inherited from FileSystemInfo.)  Public LastAccessTimeUtc  Gets or sets the time, in coordinated universal time (UTC), that the current file or directory was last accessed. (Inherited from FileSystemInfo.)  Public LastWriteTime  Gets or sets the time when the current file or directory was last written to. (Inherited from FileSystemInfo.)
  • 13.  Public property LastWriteTimeUtc  Gets or sets the time, in coordinated universal time (UTC), when the current file or directory was last written to. (Inherited from FileSystemInfo.)  Public Name  Gets the name of this DirectoryInfo instance. (Overrides FileSystemInfo.Name.)  Public Parent  Gets the parent directory of a specified subdirectory.  Public Root  Gets the root portion of the directory.
  • 14. System.IO.DriveInfo  Public property AvailableFreeSpace  Indicates the amount of available free space on a drive, in bytes.  Public property DriveFormat  Gets the name of the file system, such as NTFS or FAT32.  Public property DriveType  Gets the drive type, such as CD-ROM, removable, network, or fixed.
  • 15.  Public property IsReady  Gets a value that indicates whether a drive is ready.  Public property Name  Gets the name of a drive, such as C:.  Public property RootDirectory  Gets the root directory of a drive.
  • 16.  Public property TotalFreeSpace  Gets the total amount of free space available on a drive, in bytes.  Public property TotalSize  Gets the total size of storage space on a drive, in bytes.  Public property VolumeLabel  Gets or sets the volume label of a drive.
  • 17. Methods DriveInfo and Example  GetDrives() Retrieves the drive names of all logical drives on a computer.
  • 18. Directory Class  Methods  Delete(String)  Deletes an empty directory from a specified path.  Exists()  Determines whether the given path refers to an existing directory on disk.  GetAccessControl(String)  Gets a DirectorySecurity object that encapsulates the access control list (ACL) entries for a specified directory  GetCurrentDirectory()  Returns the names of subdirectories (including their paths) in the specified directory.
  • 19. Example of Drive Info public static void Main() { DriveInfo[] allDrives = DriveInfo.GetDrives(); foreach (DriveInfo d in allDrives) { Console.WriteLine("Drive {0}", d.Name); Console.WriteLine(" File type: {0}", d.DriveType); if (d.IsReady == true) { Console.WriteLine(" Volume label: {0}", d.VolumeLabel); Console.WriteLine(" File system: {0}", d.DriveFormat); Console.WriteLine( " Available space to current user:{0, 15} bytes", d.AvailableFreeSpace); Console.WriteLine( " Total available space: {0, 15} bytes", d.TotalFreeSpace); Console.WriteLine( " Total size of drive: {0, 15} bytes ", d.TotalSize); } } System.Console.ReadLine(); }
  • 20. Drive C: File type: Fixed Volume label: Windows File system: NTFS Available space to current user: 135662944256 bytes Total available space: 135662944256 bytes Total size of drive: 320070479872 bytes Drive D: File type: CDRom Drive Q: File type: Fixed
  • 21.  Example of File info  Total PhysicalMemory example