Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Сети";
Текущий архив: 2002.08.26;
Скачать: [xml.tar.bz2];

Вниз

Как определить, находится ли файл в сети?   Найти похожие ветки 

 
Виктор   (2002-06-14 22:28) [0]

s := "e:\base\my.dat";
b := isNetFile(s);

Как реализовать функцию isNetFile(), чтобы она возвращала True, если e: - подключенный сетевой диск?


 
jedi   (2002-06-14 22:30) [1]

Naverno mojno sna4ala uznat" na kokom diske sidit file potom uznat" kakoi disk: lokalnii ili setevoi...


 
Виктор   (2002-06-14 22:44) [2]

а как узнать - локальный диск или сетевой?


 
jedi   (2002-06-14 23:06) [3]

C: String;
DType: Integer;
DriveString: String;

begin
C := chr(i)+":\";
DType := GetDriveType(PChar(C));
case DType of
0: DriveString := C+" The drive type cannot be determined.";
1: DriveString := C+" The root directory does not exist.";
DRIVE_REMOVABLE: DriveString :=
C+" The drive can be removed from the drive.";
DRIVE_FIXED: DriveString :=
C+" The disk cannot be removed from the drive.";
DRIVE_REMOTE: DriveString :=
C+" The drive is a remote (network) drive.";
DRIVE_CDROM: DriveString := C+" The drive is a CD-ROM drive.";
DRIVE_RAMDISK: DriveString := C+" The drive is a RAM disk.";
end;

end;


 
jedi   (2002-06-14 23:08) [4]

var
i: Integer;
C: String;
DType: Integer;
DriveString: String;
begin
for i := 65 to 90 do
begin
C := chr(i)+":\";
DType := GetDriveType(PChar(C));
case DType of
0: DriveString := C+" The drive type cannot be determined.";
1: DriveString := C+" The root directory does not exist.";
DRIVE_REMOVABLE: DriveString :=
C+" The drive can be removed from the drive.";
DRIVE_FIXED: DriveString :=
C+" The disk cannot be removed from the drive.";
DRIVE_REMOTE: DriveString :=
C+" The drive is a remote (network) drive.";
DRIVE_CDROM: DriveString := C+" The drive is a CD-ROM drive.";
DRIVE_RAMDISK: DriveString := C+" The drive is a RAM disk.";
end;
if not ((DType = 0) or (DType = 1)) then
lbDrives.Items.Add(DriveString);
end;

end;


 
Виктор   (2002-06-14 23:16) [5]

спасибо, теперь мне ясно.



Страницы: 1 вся ветка

Форум: "Сети";
Текущий архив: 2002.08.26;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.006 c
3-84911
Andrushk
2002-08-01 10:52
2002.08.26
Как в DBGrid запретить перенос отдельных столбцов


1-85041
GreatQuaker
2002-08-14 05:25
2002.08.26
MessageBox


14-85257
Agent Smith
2002-07-31 19:49
2002.08.26
Athlon XP 1800 + Vulcan 6Cu - ЖАРА!!!


3-84918
Dim!S
2002-08-07 07:26
2002.08.26
Комбинированный фильтр


1-85060
shubin
2002-08-14 12:28
2002.08.26
Вычислить формулу!





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский