File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -720,6 +720,46 @@ Subroutine
720
720
721
721
---
722
722
723
+ ## ` get_file_size ` - Gets the size (in bytes) of a file.
724
+
725
+ ### Status
726
+
727
+ Experimental
728
+
729
+ ### Description
730
+
731
+ This function gets the size (in bytes) of a file in the filesystem.
732
+ It follows symbolic links, returns an error if the symbolic link or the ` path ` points to a directory instead.
733
+ It is designed to work across multiple platforms. On Windows, paths with both forward ` / ` and backward ` \ ` slashes are accepted.
734
+
735
+ ### Syntax
736
+
737
+ ` res = [[stdlib_system(module):get_file_size(function)]] (path [, err]) `
738
+
739
+ ### Class
740
+
741
+ Function
742
+
743
+ ### Arguments
744
+
745
+ ` path ` : Shall be a character string containing the path of the file. It is an ` intent(in) ` argument.
746
+
747
+ ` err ` (optional): Shall be of type ` state_type ` , and is used for error handling. It is an ` intent(out) ` argument.
748
+
749
+ ### Return values
750
+
751
+ ` res ` : it is the size (in bytes). It is of type ` integer(kind=int64) ` .
752
+
753
+ ` err ` : it is an optional state return flag. On error if not requested, an ` FS_ERROR ` will trigger an error stop.
754
+
755
+ ### Example
756
+
757
+ ``` fortran
758
+ {!example/system/example_get_file_size.f90!}
759
+ ```
760
+
761
+ ---
762
+
723
763
## ` null_device ` - Return the null device file path
724
764
725
765
### Status
You can’t perform that action at this time.
0 commit comments